diff --git a/src/util.rs b/src/util.rs
index ce3bc6c099eb53f2c998d3805ca914662486bfe3..96de88fdb7fa2515982b884041ca0063739e27b2 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -164,7 +164,7 @@ macro_rules! define_str_enum {
         }
 
         impl $enum {
-            pub const fn as_str(&self) -> &str {
+            pub const fn as_str(&self) -> &'static str {
                 match self {
                     $( Self::$space => $str, )+
                 }