@@ -1194,15 +1194,9 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
11941194 // Mark the given macro as unused unless its name starts with `_`.
11951195 // Macro uses will remove items from this set, and the remaining
11961196 // items will be reported as `unused_macros`.
1197- fn insert_unused_macro (
1198- & mut self ,
1199- ident : Ident ,
1200- def_id : LocalDefId ,
1201- node_id : NodeId ,
1202- span : Span ,
1203- ) {
1197+ fn insert_unused_macro ( & mut self , ident : Ident , def_id : LocalDefId , node_id : NodeId ) {
12041198 if !ident. as_str ( ) . starts_with ( '_' ) {
1205- self . r . unused_macros . insert ( def_id, ( node_id, span ) ) ;
1199+ self . r . unused_macros . insert ( def_id, ( node_id, ident ) ) ;
12061200 }
12071201 }
12081202
@@ -1246,7 +1240,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
12461240 self . r . define ( module, ident, MacroNS , ( res, vis, span, expansion, IsMacroExport ) ) ;
12471241 } else {
12481242 self . r . check_reserved_macro_name ( ident, res) ;
1249- self . insert_unused_macro ( ident, def_id, item. id , span ) ;
1243+ self . insert_unused_macro ( ident, def_id, item. id ) ;
12501244 }
12511245 self . r . visibilities . insert ( def_id, vis) ;
12521246 self . r . arenas . alloc_macro_rules_scope ( MacroRulesScope :: Binding (
@@ -1267,7 +1261,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
12671261 _ => self . resolve_visibility ( & item. vis ) ,
12681262 } ;
12691263 if vis != ty:: Visibility :: Public {
1270- self . insert_unused_macro ( ident, def_id, item. id , span ) ;
1264+ self . insert_unused_macro ( ident, def_id, item. id ) ;
12711265 }
12721266 self . r . define ( module, ident, MacroNS , ( res, vis, span, expansion) ) ;
12731267 self . r . visibilities . insert ( def_id, vis) ;
0 commit comments