@@ -242,25 +242,6 @@ impl StyleChecker {
242242 self . state = initial_state;
243243 }
244244
245- /// If we see a normal s! macro without any attributes we just need
246- /// to check if there are any duplicates.
247- fn handle_s_macro_no_attrs ( & mut self , item_macro : & syn:: ItemMacro ) {
248- let span = item_macro. span ( ) ;
249- match self . seen_s_macro_cfgs . get ( "" ) {
250- Some ( seen_span) => {
251- self . error (
252- "duplicate s! macro" . to_string ( ) ,
253- span,
254- format ! ( "other s! macro" ) ,
255- ( Some ( * seen_span) , "combine the two" . to_string ( ) ) ,
256- ) ;
257- }
258- None => {
259- self . seen_s_macro_cfgs . insert ( String :: new ( ) , span) ;
260- }
261- }
262- }
263-
264245 /// If an s! macro has attributes we check for any duplicates as well
265246 /// as if they are standalone positive cfgs that would be better
266247 /// in a separate file.
@@ -367,9 +348,7 @@ impl<'ast> Visit<'ast> for StyleChecker {
367348 /// instead of [syn::Macro] because it contains the attributes.
368349 fn visit_item_macro ( & mut self , item_macro : & ' ast syn:: ItemMacro ) {
369350 if item_macro. mac . path . is_ident ( "s" ) {
370- if item_macro. attrs . is_empty ( ) {
371- self . handle_s_macro_no_attrs ( item_macro) ;
372- } else {
351+ if !item_macro. attrs . is_empty ( ) {
373352 self . handle_s_macro_with_attrs ( item_macro) ;
374353 }
375354 }
0 commit comments