@@ -353,10 +353,10 @@ pub trait Visitor<'v> : Sized {
353
353
fn visit_lifetime ( & mut self , lifetime : & ' v Lifetime ) {
354
354
walk_lifetime ( self , lifetime)
355
355
}
356
- fn visit_qpath ( & mut self , qpath : & ' v QPath , id : NodeId , span : Span ) {
356
+ fn visit_qpath ( & mut self , qpath : & ' v QPath , id : HirId , span : Span ) {
357
357
walk_qpath ( self , qpath, id, span)
358
358
}
359
- fn visit_path ( & mut self , path : & ' v Path , _id : NodeId ) {
359
+ fn visit_path ( & mut self , path : & ' v Path , _id : HirId ) {
360
360
walk_path ( self , path)
361
361
}
362
362
fn visit_path_segment ( & mut self , path_span : Span , path_segment : & ' v PathSegment ) {
@@ -456,7 +456,7 @@ pub fn walk_trait_ref<'v, V>(visitor: &mut V, trait_ref: &'v TraitRef)
456
456
where V : Visitor < ' v >
457
457
{
458
458
visitor. visit_id ( trait_ref. ref_id ) ;
459
- visitor. visit_path ( & trait_ref. path , trait_ref. ref_id )
459
+ visitor. visit_path ( & trait_ref. path , trait_ref. hir_ref_id )
460
460
}
461
461
462
462
pub fn walk_item < ' v , V : Visitor < ' v > > ( visitor : & mut V , item : & ' v Item ) {
@@ -471,7 +471,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
471
471
}
472
472
ItemKind :: Use ( ref path, _) => {
473
473
visitor. visit_id ( item. id ) ;
474
- visitor. visit_path ( path, item. id ) ;
474
+ visitor. visit_path ( path, item. hir_id ) ;
475
475
}
476
476
ItemKind :: Static ( ref typ, _, body) |
477
477
ItemKind :: Const ( ref typ, body) => {
@@ -602,7 +602,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
602
602
visitor. visit_fn_decl ( & function_declaration. decl ) ;
603
603
}
604
604
TyKind :: Path ( ref qpath) => {
605
- visitor. visit_qpath ( qpath, typ. id , typ. span ) ;
605
+ visitor. visit_qpath ( qpath, typ. hir_id , typ. span ) ;
606
606
}
607
607
TyKind :: Array ( ref ty, ref length) => {
608
608
visitor. visit_ty ( ty) ;
@@ -621,7 +621,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
621
621
}
622
622
}
623
623
624
- pub fn walk_qpath < ' v , V : Visitor < ' v > > ( visitor : & mut V , qpath : & ' v QPath , id : NodeId , span : Span ) {
624
+ pub fn walk_qpath < ' v , V : Visitor < ' v > > ( visitor : & mut V , qpath : & ' v QPath , id : HirId , span : Span ) {
625
625
match * qpath {
626
626
QPath :: Resolved ( ref maybe_qself, ref path) => {
627
627
if let Some ( ref qself) = * maybe_qself {
@@ -670,14 +670,14 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
670
670
visitor. visit_id ( pattern. id ) ;
671
671
match pattern. node {
672
672
PatKind :: TupleStruct ( ref qpath, ref children, _) => {
673
- visitor. visit_qpath ( qpath, pattern. id , pattern. span ) ;
673
+ visitor. visit_qpath ( qpath, pattern. hir_id , pattern. span ) ;
674
674
walk_list ! ( visitor, visit_pat, children) ;
675
675
}
676
676
PatKind :: Path ( ref qpath) => {
677
- visitor. visit_qpath ( qpath, pattern. id , pattern. span ) ;
677
+ visitor. visit_qpath ( qpath, pattern. hir_id , pattern. span ) ;
678
678
}
679
679
PatKind :: Struct ( ref qpath, ref fields, _) => {
680
- visitor. visit_qpath ( qpath, pattern. id , pattern. span ) ;
680
+ visitor. visit_qpath ( qpath, pattern. hir_id , pattern. span ) ;
681
681
for field in fields {
682
682
visitor. visit_id ( field. node . id ) ;
683
683
visitor. visit_ident ( field. node . ident ) ;
@@ -985,7 +985,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
985
985
visitor. visit_anon_const ( count)
986
986
}
987
987
ExprKind :: Struct ( ref qpath, ref fields, ref optional_base) => {
988
- visitor. visit_qpath ( qpath, expression. id , expression. span ) ;
988
+ visitor. visit_qpath ( qpath, expression. hir_id , expression. span ) ;
989
989
for field in fields {
990
990
visitor. visit_id ( field. id ) ;
991
991
visitor. visit_ident ( field. ident ) ;
@@ -1062,7 +1062,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
1062
1062
visitor. visit_expr ( index_expression)
1063
1063
}
1064
1064
ExprKind :: Path ( ref qpath) => {
1065
- visitor. visit_qpath ( qpath, expression. id , expression. span ) ;
1065
+ visitor. visit_qpath ( qpath, expression. hir_id , expression. span ) ;
1066
1066
}
1067
1067
ExprKind :: Break ( ref destination, ref opt_expr) => {
1068
1068
if let Some ( ref label) = destination. label {
@@ -1108,9 +1108,9 @@ pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm) {
1108
1108
}
1109
1109
1110
1110
pub fn walk_vis < ' v , V : Visitor < ' v > > ( visitor : & mut V , vis : & ' v Visibility ) {
1111
- if let VisibilityKind :: Restricted { ref path, id } = vis. node {
1111
+ if let VisibilityKind :: Restricted { ref path, id, hir_id } = vis. node {
1112
1112
visitor. visit_id ( id) ;
1113
- visitor. visit_path ( path, id )
1113
+ visitor. visit_path ( path, hir_id )
1114
1114
}
1115
1115
}
1116
1116
0 commit comments