From 3eec886fe83b30636622d6ba97880bf473de8a0a Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 21 Sep 2021 16:41:47 +0530 Subject: use stderr by default, improved macro code --- macros/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'macros/src') 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 { if let syn::Expr::Lit(name_lit) = name { if let Lit::Str(name_str) = &name_lit.lit { return quote! { - fn name(&self) -> &str { + fn name() -> &'static str { #name_str } }; @@ -90,7 +90,7 @@ fn generate_note_fn(meta: &LintMeta) -> TokenStream2 { if let syn::Expr::Lit(note_lit) = note { if let Lit::Str(note_str) = ¬e_lit.lit { return quote! { - fn note(&self) -> &str { + fn note() -> &'static str { #note_str } }; -- cgit v1.2.3