@@ -224,25 +224,6 @@ impl StyleChecker {
224224 self . state = initial_state;
225225 }
226226
227- /// If we see a normal s! macro without any attributes we just need
228- /// to check if there are any duplicates.
229- fn handle_s_macro_no_attrs ( & mut self , item_macro : & syn:: ItemMacro ) {
230- let span = item_macro. span ( ) ;
231- match self . seen_s_macro_cfgs . get ( "" ) {
232- Some ( seen_span) => {
233- self . error (
234- "duplicate s! macro" . to_string ( ) ,
235- span,
236- format ! ( "other s! macro" ) ,
237- ( Some ( * seen_span) , "combine the two" . to_string ( ) ) ,
238- ) ;
239- }
240- None => {
241- self . seen_s_macro_cfgs . insert ( String :: new ( ) , span) ;
242- }
243- }
244- }
245-
246227 /// If an s! macro has attributes we check for any duplicates as well
247228 /// as if they are standalone positive cfgs that would be better
248229 /// in a separate file.
@@ -349,9 +330,7 @@ impl<'ast> Visit<'ast> for StyleChecker {
349330 /// instead of [syn::Macro] because it contains the attributes.
350331 fn visit_item_macro ( & mut self , item_macro : & ' ast syn:: ItemMacro ) {
351332 if item_macro. mac . path . is_ident ( "s" ) {
352- if item_macro. attrs . is_empty ( ) {
353- self . handle_s_macro_no_attrs ( item_macro) ;
354- } else {
333+ if !item_macro. attrs . is_empty ( ) {
355334 self . handle_s_macro_with_attrs ( item_macro) ;
356335 }
357336 }
0 commit comments