@@ -14,7 +14,7 @@ use syntax::feature_gate::{self, GateIssue};
14
14
use syntax_pos:: Span ;
15
15
use errors:: { DiagnosticBuilder , DiagnosticId } ;
16
16
17
- use rustc:: hir:: intravisit :: { self , Visitor , NestedVisitorMap } ;
17
+ use rustc:: hir:: itemlikevisit :: ItemLikeVisitor ;
18
18
use rustc:: hir;
19
19
20
20
/// Helper type of a temporary returned by `.for_item(...)`.
@@ -1015,30 +1015,23 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
1015
1015
}
1016
1016
}
1017
1017
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 ) {
1024
1020
debug ! ( "visit_item: {:?}" , i) ;
1025
1021
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) ;
1028
1023
}
1029
1024
1030
- fn visit_trait_item ( & mut self , trait_item : & ' v hir:: TraitItem ) {
1025
+ fn visit_trait_item ( & mut self , trait_item : & ' tcx hir:: TraitItem ) {
1031
1026
debug ! ( "visit_trait_item: {:?}" , trait_item) ;
1032
1027
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) ;
1035
1029
}
1036
1030
1037
- fn visit_impl_item ( & mut self , impl_item : & ' v hir:: ImplItem ) {
1031
+ fn visit_impl_item ( & mut self , impl_item : & ' tcx hir:: ImplItem ) {
1038
1032
debug ! ( "visit_impl_item: {:?}" , impl_item) ;
1039
1033
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) ;
1042
1035
}
1043
1036
}
1044
1037
0 commit comments