diff options
Diffstat (limited to 'macros/src/lib.rs')
-rw-r--r-- | macros/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 42f7565..36a8bb5 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs | |||
@@ -73,7 +73,7 @@ fn generate_name_fn(meta: &LintMeta) -> TokenStream2 { | |||
73 | if let syn::Expr::Lit(name_lit) = name { | 73 | if let syn::Expr::Lit(name_lit) = name { |
74 | if let Lit::Str(name_str) = &name_lit.lit { | 74 | if let Lit::Str(name_str) = &name_lit.lit { |
75 | return quote! { | 75 | return quote! { |
76 | fn name(&self) -> &str { | 76 | fn name() -> &'static str { |
77 | #name_str | 77 | #name_str |
78 | } | 78 | } |
79 | }; | 79 | }; |
@@ -90,7 +90,7 @@ fn generate_note_fn(meta: &LintMeta) -> TokenStream2 { | |||
90 | if let syn::Expr::Lit(note_lit) = note { | 90 | if let syn::Expr::Lit(note_lit) = note { |
91 | if let Lit::Str(note_str) = ¬e_lit.lit { | 91 | if let Lit::Str(note_str) = ¬e_lit.lit { |
92 | return quote! { | 92 | return quote! { |
93 | fn note(&self) -> &str { | 93 | fn note() -> &'static str { |
94 | #note_str | 94 | #note_str |
95 | } | 95 | } |
96 | }; | 96 | }; |