@@ -350,23 +350,21 @@ impl<'a, 'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'a, 'tcx> {
350350 // optional. They inherit stability from their parents when unannotated.
351351 hir:: ItemKind :: Impl ( .., None , _, _) | hir:: ItemKind :: ForeignMod ( ..) => { }
352352
353- hir:: ItemKind :: Mod ( ..) => self . check_missing_stability ( i. id , i. span , "module" ) ,
354-
355353 _ => self . check_missing_stability ( i. id , i. span , i. node . descriptive_variant ( ) )
356354 }
357355
358356 intravisit:: walk_item ( self , i)
359357 }
360358
361359 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 " ) ;
363361 intravisit:: walk_trait_item ( self , ti) ;
364362 }
365363
366364 fn visit_impl_item ( & mut self , ii : & ' tcx hir:: ImplItem ) {
367365 let impl_def_id = self . tcx . hir ( ) . local_def_id ( self . tcx . hir ( ) . get_parent ( ii. id ) ) ;
368366 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 " ) ;
370368 }
371369 intravisit:: walk_impl_item ( self , ii) ;
372370 }
0 commit comments