@@ -1212,13 +1212,14 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
1212
1212
let impl_def_id = tcx. hir . local_def_id ( impl_id) ;
1213
1213
tcx. construct_parameter_environment ( impl_item. span ,
1214
1214
impl_def_id,
1215
- tcx. region_maps ( ) . item_extent ( id) )
1215
+ tcx. region_maps ( impl_id)
1216
+ . item_extent ( id) )
1216
1217
}
1217
1218
hir:: ImplItemKind :: Method ( _, ref body) => {
1218
1219
tcx. construct_parameter_environment (
1219
1220
impl_item. span ,
1220
1221
tcx. hir . local_def_id ( id) ,
1221
- tcx. region_maps ( ) . call_site_extent ( id, body. node_id ) )
1222
+ tcx. region_maps ( id ) . call_site_extent ( id, body. node_id ) )
1222
1223
}
1223
1224
}
1224
1225
}
@@ -1231,18 +1232,19 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
1231
1232
let trait_def_id = tcx. hir . local_def_id ( trait_id) ;
1232
1233
tcx. construct_parameter_environment ( trait_item. span ,
1233
1234
trait_def_id,
1234
- tcx. region_maps ( ) . item_extent ( id) )
1235
+ tcx. region_maps ( id ) . item_extent ( id) )
1235
1236
}
1236
1237
hir:: TraitItemKind :: Method ( _, ref body) => {
1237
1238
// Use call-site for extent (unless this is a
1238
1239
// trait method with no default; then fallback
1239
1240
// to the method id).
1240
1241
let extent = if let hir:: TraitMethod :: Provided ( body_id) = * body {
1241
1242
// default impl: use call_site extent as free_id_outlive bound.
1242
- tcx. region_maps ( ) . call_site_extent ( id, body_id. node_id )
1243
+ tcx. region_maps ( body_id. node_id )
1244
+ . call_site_extent ( id, body_id. node_id )
1243
1245
} else {
1244
1246
// no default impl: use item extent as free_id_outlive bound.
1245
- tcx. region_maps ( ) . item_extent ( id)
1247
+ tcx. region_maps ( id ) . item_extent ( id)
1246
1248
} ;
1247
1249
tcx. construct_parameter_environment (
1248
1250
trait_item. span ,
@@ -1260,7 +1262,7 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
1260
1262
tcx. construct_parameter_environment (
1261
1263
item. span ,
1262
1264
fn_def_id,
1263
- tcx. region_maps ( ) . call_site_extent ( id, body_id. node_id ) )
1265
+ tcx. region_maps ( body_id . node_id ) . call_site_extent ( id, body_id. node_id ) )
1264
1266
}
1265
1267
hir:: ItemEnum ( ..) |
1266
1268
hir:: ItemStruct ( ..) |
@@ -1272,13 +1274,13 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
1272
1274
let def_id = tcx. hir . local_def_id ( id) ;
1273
1275
tcx. construct_parameter_environment ( item. span ,
1274
1276
def_id,
1275
- tcx. region_maps ( ) . item_extent ( id) )
1277
+ tcx. region_maps ( id ) . item_extent ( id) )
1276
1278
}
1277
1279
hir:: ItemTrait ( ..) => {
1278
1280
let def_id = tcx. hir . local_def_id ( id) ;
1279
1281
tcx. construct_parameter_environment ( item. span ,
1280
1282
def_id,
1281
- tcx. region_maps ( ) . item_extent ( id) )
1283
+ tcx. region_maps ( id ) . item_extent ( id) )
1282
1284
}
1283
1285
_ => {
1284
1286
span_bug ! ( item. span,
@@ -1296,7 +1298,7 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
1296
1298
tcx. construct_parameter_environment (
1297
1299
expr. span ,
1298
1300
base_def_id,
1299
- tcx. region_maps ( ) . call_site_extent ( id, body. node_id ) )
1301
+ tcx. region_maps ( body . node_id ) . call_site_extent ( id, body. node_id ) )
1300
1302
} else {
1301
1303
tcx. empty_parameter_environment ( )
1302
1304
}
@@ -2560,7 +2562,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
2560
2562
}
2561
2563
2562
2564
pub fn node_scope_region ( self , id : NodeId ) -> & ' tcx Region {
2563
- self . mk_region ( ty:: ReScope ( self . region_maps ( ) . node_extent ( id) ) )
2565
+ self . mk_region ( ty:: ReScope ( self . region_maps ( id ) . node_extent ( id) ) )
2564
2566
}
2565
2567
2566
2568
pub fn visit_all_item_likes_in_krate < V , F > ( self ,
0 commit comments