@@ -14,7 +14,7 @@ use syntax::feature_gate::{self, GateIssue};
1414use syntax_pos:: Span ;
1515use errors:: { DiagnosticBuilder , DiagnosticId } ;
1616
17- use rustc:: hir:: intravisit :: { self , Visitor , NestedVisitorMap } ;
17+ use rustc:: hir:: itemlikevisit :: ItemLikeVisitor ;
1818use rustc:: hir;
1919
2020/// Helper type of a temporary returned by `.for_item(...)`.
@@ -1015,30 +1015,23 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
10151015 }
10161016}
10171017
1018- impl < ' a , ' tcx , ' v > Visitor < ' v > for CheckTypeWellFormedVisitor < ' a , ' tcx > {
1019- fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' v > {
1020- NestedVisitorMap :: None
1021- }
1022-
1023- fn visit_item ( & mut self , i : & hir:: Item ) {
1018+ impl < ' a , ' tcx > ItemLikeVisitor < ' tcx > for CheckTypeWellFormedVisitor < ' a , ' tcx > {
1019+ fn visit_item ( & mut self , i : & ' tcx hir:: Item ) {
10241020 debug ! ( "visit_item: {:?}" , i) ;
10251021 let def_id = self . tcx . hir ( ) . local_def_id ( i. id ) ;
1026- ty:: query:: queries:: check_item_well_formed:: ensure ( self . tcx , def_id) ;
1027- intravisit:: walk_item ( self , i) ;
1022+ self . tcx . ensure ( ) . check_item_well_formed ( def_id) ;
10281023 }
10291024
1030- fn visit_trait_item ( & mut self , trait_item : & ' v hir:: TraitItem ) {
1025+ fn visit_trait_item ( & mut self , trait_item : & ' tcx hir:: TraitItem ) {
10311026 debug ! ( "visit_trait_item: {:?}" , trait_item) ;
10321027 let def_id = self . tcx . hir ( ) . local_def_id ( trait_item. id ) ;
1033- ty:: query:: queries:: check_trait_item_well_formed:: ensure ( self . tcx , def_id) ;
1034- intravisit:: walk_trait_item ( self , trait_item)
1028+ self . tcx . ensure ( ) . check_trait_item_well_formed ( def_id) ;
10351029 }
10361030
1037- fn visit_impl_item ( & mut self , impl_item : & ' v hir:: ImplItem ) {
1031+ fn visit_impl_item ( & mut self , impl_item : & ' tcx hir:: ImplItem ) {
10381032 debug ! ( "visit_impl_item: {:?}" , impl_item) ;
10391033 let def_id = self . tcx . hir ( ) . local_def_id ( impl_item. id ) ;
1040- ty:: query:: queries:: check_impl_item_well_formed:: ensure ( self . tcx , def_id) ;
1041- intravisit:: walk_impl_item ( self , impl_item)
1034+ self . tcx . ensure ( ) . check_impl_item_well_formed ( def_id) ;
10421035 }
10431036}
10441037
0 commit comments