@@ -685,7 +685,7 @@ impl<'a> LoweringContext<'a> {
685
685
return self . lower_ty ( ty) ;
686
686
}
687
687
TyKind :: Path ( ref qself, ref path) => {
688
- let id = self . lower_node_id ( t. id ) . node_id ;
688
+ let id = self . lower_node_id ( t. id ) ;
689
689
let qpath = self . lower_qpath ( t. id , qself, path, ParamMode :: Explicit ) ;
690
690
return self . ty_path ( id, t. span , qpath) ;
691
691
}
@@ -734,10 +734,12 @@ impl<'a> LoweringContext<'a> {
734
734
TyKind :: Mac ( _) => panic ! ( "TyMac should have been expanded by now." ) ,
735
735
} ;
736
736
737
+ let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( t. id ) ;
737
738
P ( hir:: Ty {
738
- id : self . lower_node_id ( t . id ) . node_id ,
739
+ id : node_id,
739
740
node : kind,
740
741
span : t. span ,
742
+ hir_id,
741
743
} )
742
744
}
743
745
@@ -863,7 +865,7 @@ impl<'a> LoweringContext<'a> {
863
865
// Otherwise, the base path is an implicit `Self` type path,
864
866
// e.g. `Vec` in `Vec::new` or `<I as Iterator>::Item` in
865
867
// `<I as Iterator>::Item::default`.
866
- let new_id = self . next_id ( ) . node_id ;
868
+ let new_id = self . next_id ( ) ;
867
869
self . ty_path ( new_id, p. span , hir:: QPath :: Resolved ( qself, path) )
868
870
} ;
869
871
@@ -888,7 +890,7 @@ impl<'a> LoweringContext<'a> {
888
890
}
889
891
890
892
// Wrap the associated extension in another type node.
891
- let new_id = self . next_id ( ) . node_id ;
893
+ let new_id = self . next_id ( ) ;
892
894
ty = self . ty_path ( new_id, p. span , qpath) ;
893
895
}
894
896
@@ -996,7 +998,8 @@ impl<'a> LoweringContext<'a> {
996
998
let & ParenthesizedParameterData { ref inputs, ref output, span } = data;
997
999
let inputs = inputs. iter ( ) . map ( |ty| self . lower_ty ( ty) ) . collect ( ) ;
998
1000
let mk_tup = |this : & mut Self , tys, span| {
999
- P ( hir:: Ty { node : hir:: TyTup ( tys) , id : this. next_id ( ) . node_id , span } )
1001
+ let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
1002
+ P ( hir:: Ty { node : hir:: TyTup ( tys) , id : node_id, hir_id, span } )
1000
1003
} ;
1001
1004
1002
1005
hir:: PathParameters {
@@ -2976,7 +2979,7 @@ impl<'a> LoweringContext<'a> {
2976
2979
self . expr_block ( block, attrs)
2977
2980
}
2978
2981
2979
- fn ty_path ( & mut self , id : NodeId , span : Span , qpath : hir:: QPath ) -> P < hir:: Ty > {
2982
+ fn ty_path ( & mut self , id : LoweredNodeId , span : Span , qpath : hir:: QPath ) -> P < hir:: Ty > {
2980
2983
let mut id = id;
2981
2984
let node = match qpath {
2982
2985
hir:: QPath :: Resolved ( None , path) => {
@@ -2986,14 +2989,14 @@ impl<'a> LoweringContext<'a> {
2986
2989
bound_lifetimes : hir_vec ! [ ] ,
2987
2990
trait_ref : hir:: TraitRef {
2988
2991
path : path. and_then ( |path| path) ,
2989
- ref_id : id,
2992
+ ref_id : id. node_id ,
2990
2993
} ,
2991
2994
span,
2992
2995
} ;
2993
2996
2994
2997
// The original ID is taken by the `PolyTraitRef`,
2995
2998
// so the `Ty` itself needs a different one.
2996
- id = self . next_id ( ) . node_id ;
2999
+ id = self . next_id ( ) ;
2997
3000
2998
3001
hir:: TyTraitObject ( hir_vec ! [ principal] , self . elided_lifetime ( span) )
2999
3002
} else {
@@ -3002,7 +3005,7 @@ impl<'a> LoweringContext<'a> {
3002
3005
}
3003
3006
_ => hir:: TyPath ( qpath)
3004
3007
} ;
3005
- P ( hir:: Ty { id, node, span } )
3008
+ P ( hir:: Ty { id : id . node_id , hir_id : id . hir_id , node, span } )
3006
3009
}
3007
3010
3008
3011
fn elided_lifetime ( & mut self , span : Span ) -> hir:: Lifetime {
0 commit comments