@@ -350,23 +350,21 @@ impl<'a, 'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'a, 'tcx> {
350
350
// optional. They inherit stability from their parents when unannotated.
351
351
hir:: ItemKind :: Impl ( .., None , _, _) | hir:: ItemKind :: ForeignMod ( ..) => { }
352
352
353
- hir:: ItemKind :: Mod ( ..) => self . check_missing_stability ( i. id , i. span , "module" ) ,
354
-
355
353
_ => self . check_missing_stability ( i. id , i. span , i. node . descriptive_variant ( ) )
356
354
}
357
355
358
356
intravisit:: walk_item ( self , i)
359
357
}
360
358
361
359
fn visit_trait_item ( & mut self , ti : & ' tcx hir:: TraitItem ) {
362
- self . check_missing_stability ( ti. id , ti. span , "node " ) ;
360
+ self . check_missing_stability ( ti. id , ti. span , "item " ) ;
363
361
intravisit:: walk_trait_item ( self , ti) ;
364
362
}
365
363
366
364
fn visit_impl_item ( & mut self , ii : & ' tcx hir:: ImplItem ) {
367
365
let impl_def_id = self . tcx . hir ( ) . local_def_id ( self . tcx . hir ( ) . get_parent ( ii. id ) ) ;
368
366
if self . tcx . impl_trait_ref ( impl_def_id) . is_none ( ) {
369
- self . check_missing_stability ( ii. id , ii. span , "node " ) ;
367
+ self . check_missing_stability ( ii. id , ii. span , "item " ) ;
370
368
}
371
369
intravisit:: walk_impl_item ( self , ii) ;
372
370
}
0 commit comments