@@ -1194,15 +1194,9 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
1194
1194
// Mark the given macro as unused unless its name starts with `_`.
1195
1195
// Macro uses will remove items from this set, and the remaining
1196
1196
// 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 ) {
1204
1198
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 ) ) ;
1206
1200
}
1207
1201
}
1208
1202
@@ -1246,7 +1240,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
1246
1240
self . r . define ( module, ident, MacroNS , ( res, vis, span, expansion, IsMacroExport ) ) ;
1247
1241
} else {
1248
1242
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 ) ;
1250
1244
}
1251
1245
self . r . visibilities . insert ( def_id, vis) ;
1252
1246
self . r . arenas . alloc_macro_rules_scope ( MacroRulesScope :: Binding (
@@ -1267,7 +1261,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
1267
1261
_ => self . resolve_visibility ( & item. vis ) ,
1268
1262
} ;
1269
1263
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 ) ;
1271
1265
}
1272
1266
self . r . define ( module, ident, MacroNS , ( res, vis, span, expansion) ) ;
1273
1267
self . r . visibilities . insert ( def_id, vis) ;
0 commit comments