@@ -1040,13 +1040,13 @@ for LateContextAndPass<'a, 'tcx, T> {
1040
1040
1041
1041
fn visit_variant_data ( & mut self ,
1042
1042
s : & ' tcx hir:: VariantData ,
1043
- name : ast:: Name ,
1044
- g : & ' tcx hir:: Generics ,
1045
- item_id : hir:: HirId ,
1043
+ _ : ast:: Name ,
1044
+ _ : & ' tcx hir:: Generics ,
1045
+ _ : hir:: HirId ,
1046
1046
_: Span ) {
1047
- lint_callback ! ( self , check_struct_def, s, name , g , item_id ) ;
1047
+ lint_callback ! ( self , check_struct_def, s) ;
1048
1048
hir_visit:: walk_struct_def ( self , s) ;
1049
- lint_callback ! ( self , check_struct_def_post, s, name , g , item_id ) ;
1049
+ lint_callback ! ( self , check_struct_def_post, s) ;
1050
1050
}
1051
1051
1052
1052
fn visit_struct_field ( & mut self , s : & ' tcx hir:: StructField ) {
@@ -1061,9 +1061,9 @@ for LateContextAndPass<'a, 'tcx, T> {
1061
1061
g : & ' tcx hir:: Generics ,
1062
1062
item_id : hir:: HirId ) {
1063
1063
self . with_lint_attrs ( v. id , & v. attrs , |cx| {
1064
- lint_callback ! ( cx, check_variant, v, g ) ;
1064
+ lint_callback ! ( cx, check_variant, v) ;
1065
1065
hir_visit:: walk_variant ( cx, v, g, item_id) ;
1066
- lint_callback ! ( cx, check_variant_post, v, g ) ;
1066
+ lint_callback ! ( cx, check_variant_post, v) ;
1067
1067
} )
1068
1068
}
1069
1069
@@ -1214,18 +1214,13 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
1214
1214
run_early_pass ! ( self , check_fn_post, fk, decl, span, id) ;
1215
1215
}
1216
1216
1217
- fn visit_variant_data ( & mut self ,
1218
- s : & ' a ast:: VariantData ,
1219
- ident : ast:: Ident ,
1220
- g : & ' a ast:: Generics ,
1221
- item_id : ast:: NodeId ,
1222
- _: Span ) {
1223
- run_early_pass ! ( self , check_struct_def, s, ident, g, item_id) ;
1217
+ fn visit_variant_data ( & mut self , s : & ' a ast:: VariantData ) {
1218
+ run_early_pass ! ( self , check_struct_def, s) ;
1224
1219
if let Some ( ctor_hir_id) = s. ctor_id ( ) {
1225
1220
self . check_id ( ctor_hir_id) ;
1226
1221
}
1227
1222
ast_visit:: walk_struct_def ( self , s) ;
1228
- run_early_pass ! ( self , check_struct_def_post, s, ident , g , item_id ) ;
1223
+ run_early_pass ! ( self , check_struct_def_post, s) ;
1229
1224
}
1230
1225
1231
1226
fn visit_struct_field ( & mut self , s : & ' a ast:: StructField ) {
@@ -1235,11 +1230,11 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
1235
1230
} )
1236
1231
}
1237
1232
1238
- fn visit_variant ( & mut self , v : & ' a ast:: Variant , g : & ' a ast :: Generics , item_id : ast :: NodeId ) {
1239
- self . with_lint_attrs ( item_id , & v. attrs , |cx| {
1240
- run_early_pass ! ( cx, check_variant, v, g ) ;
1241
- ast_visit:: walk_variant ( cx, v, g , item_id ) ;
1242
- run_early_pass ! ( cx, check_variant_post, v, g ) ;
1233
+ fn visit_variant ( & mut self , v : & ' a ast:: Variant ) {
1234
+ self . with_lint_attrs ( v . id , & v. attrs , |cx| {
1235
+ run_early_pass ! ( cx, check_variant, v) ;
1236
+ ast_visit:: walk_variant ( cx, v) ;
1237
+ run_early_pass ! ( cx, check_variant_post, v) ;
1243
1238
} )
1244
1239
}
1245
1240
0 commit comments