@@ -1139,7 +1139,7 @@ impl<'a> LoweringContext<'a> {
1139
1139
}
1140
1140
hir:: TyTraitObject ( bounds, lifetime_bound)
1141
1141
}
1142
- TyKind :: ImplTrait ( exist_ty_node_id , ref bounds) => {
1142
+ TyKind :: ImplTrait ( def_node_id , ref bounds) => {
1143
1143
let span = t. span ;
1144
1144
match itctx {
1145
1145
ImplTraitContext :: Existential ( fn_def_id, _, _) => {
@@ -1159,27 +1159,27 @@ impl<'a> LoweringContext<'a> {
1159
1159
. definitions ( )
1160
1160
. create_def_with_parent (
1161
1161
fn_def_id. index ,
1162
- exist_ty_node_id ,
1162
+ def_node_id ,
1163
1163
DefPathData :: ExistentialImplTrait ,
1164
1164
DefIndexAddressSpace :: High ,
1165
1165
Mark :: root ( ) ,
1166
1166
exist_ty_span,
1167
1167
) ;
1168
1168
1169
1169
// the `t` is just for printing debug messages
1170
- self . allocate_hir_id_counter ( exist_ty_node_id , t) ;
1170
+ self . allocate_hir_id_counter ( def_node_id , t) ;
1171
1171
1172
- let hir_bounds = self . with_hir_id_owner ( exist_ty_node_id , |lctx| {
1172
+ let hir_bounds = self . with_hir_id_owner ( def_node_id , |lctx| {
1173
1173
lctx. lower_bounds ( bounds, itctx)
1174
1174
} ) ;
1175
1175
1176
1176
let ( path_params, params) = self . generics_from_impl_trait_bounds (
1177
- exist_ty_node_id ,
1177
+ def_node_id ,
1178
1178
exist_ty_def_index,
1179
1179
& hir_bounds,
1180
1180
) ;
1181
1181
1182
- self . with_hir_id_owner ( exist_ty_node_id , |lctx| {
1182
+ self . with_hir_id_owner ( def_node_id , |lctx| {
1183
1183
let exist_ty_item_kind = hir:: ItemExistential ( hir:: ExistTy {
1184
1184
generics : hir:: Generics {
1185
1185
params,
@@ -1192,7 +1192,7 @@ impl<'a> LoweringContext<'a> {
1192
1192
bounds : hir_bounds,
1193
1193
impl_trait_fn : Some ( fn_def_id) ,
1194
1194
} ) ;
1195
- let exist_ty_id = lctx. lower_node_id ( exist_ty_node_id ) ;
1195
+ let exist_ty_id = lctx. lower_node_id ( def_node_id ) ;
1196
1196
// Generate an `existential type Foo: Trait;` declaration
1197
1197
trace ! ( "creating existential type with id {:#?}" , exist_ty_id) ;
1198
1198
// Set the name to `impl Bound1 + Bound2`
@@ -1225,8 +1225,7 @@ impl<'a> LoweringContext<'a> {
1225
1225
} )
1226
1226
}
1227
1227
ImplTraitContext :: Universal ( def_id, in_band_ty_params) => {
1228
- let def_node_id = self . next_id ( ) . node_id ;
1229
-
1228
+ self . lower_node_id ( def_node_id) ;
1230
1229
// Add a definition for the in-band TyParam
1231
1230
let def_index = self . resolver . definitions ( ) . create_def_with_parent (
1232
1231
def_id. index ,
0 commit comments