@@ -1099,6 +1099,8 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
1099
1099
}
1100
1100
1101
1101
/// Wraps a call to `noop_visit_*` / `noop_flat_map_*`
1102
+ /// for an AST node that supports attributes
1103
+ /// (see the `Annotatable` enum)
1102
1104
/// This method assigns a `NodeId`, and sets that `NodeId`
1103
1105
/// as our current 'lint node id'. If a macro call is found
1104
1106
/// inside this AST node, we will use this AST node's `NodeId`
@@ -1269,9 +1271,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
1269
1271
fn visit_pat ( & mut self , pat : & mut P < ast:: Pat > ) {
1270
1272
match pat. kind {
1271
1273
PatKind :: MacCall ( _) => { }
1272
- _ => {
1273
- return assign_id ! ( self , & mut pat. id, || noop_visit_pat( pat, self ) ) ;
1274
- }
1274
+ _ => return noop_visit_pat ( pat, self ) ,
1275
1275
}
1276
1276
1277
1277
visit_clobber ( pat, |mut pat| match mem:: replace ( & mut pat. kind , PatKind :: Wild ) {
@@ -1326,7 +1326,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
1326
1326
& mut self . cx . current_expansion . dir_ownership ,
1327
1327
DirOwnership :: UnownedViaBlock ,
1328
1328
) ;
1329
- assign_id ! ( self , & mut block . id , || noop_visit_block( block, self ) ) ;
1329
+ noop_visit_block ( block, self ) ;
1330
1330
self . cx . current_expansion . dir_ownership = orig_dir_ownership;
1331
1331
}
1332
1332
@@ -1498,7 +1498,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
1498
1498
fn visit_ty ( & mut self , ty : & mut P < ast:: Ty > ) {
1499
1499
match ty. kind {
1500
1500
ast:: TyKind :: MacCall ( _) => { }
1501
- _ => return assign_id ! ( self , & mut ty . id , || noop_visit_ty( ty, self ) ) ,
1501
+ _ => return noop_visit_ty ( ty, self ) ,
1502
1502
} ;
1503
1503
1504
1504
visit_clobber ( ty, |mut ty| match mem:: replace ( & mut ty. kind , ast:: TyKind :: Err ) {
0 commit comments