aboutsummaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-09-21 12:11:47 +0100
committerAkshay <[email protected]>2021-09-21 12:12:30 +0100
commit3eec886fe83b30636622d6ba97880bf473de8a0a (patch)
treed456eac8a9a78bc211cdd1223dadcbdf647552b5 /macros
parent40867728c023a9f95f346671b51be68002cc7552 (diff)
use stderr by default, improved macro code
Diffstat (limited to 'macros')
-rw-r--r--macros/src/lib.rs4
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) = &note_lit.lit { 91 if let Lit::Str(note_str) = &note_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 };