@@ -1212,13 +1212,14 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
12121212 let impl_def_id = tcx. hir . local_def_id ( impl_id) ;
12131213 tcx. construct_parameter_environment ( impl_item. span ,
12141214 impl_def_id,
1215- tcx. region_maps ( ) . item_extent ( id) )
1215+ tcx. region_maps ( impl_id)
1216+ . item_extent ( id) )
12161217 }
12171218 hir:: ImplItemKind :: Method ( _, ref body) => {
12181219 tcx. construct_parameter_environment (
12191220 impl_item. span ,
12201221 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 ) )
12221223 }
12231224 }
12241225 }
@@ -1231,18 +1232,19 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
12311232 let trait_def_id = tcx. hir . local_def_id ( trait_id) ;
12321233 tcx. construct_parameter_environment ( trait_item. span ,
12331234 trait_def_id,
1234- tcx. region_maps ( ) . item_extent ( id) )
1235+ tcx. region_maps ( id ) . item_extent ( id) )
12351236 }
12361237 hir:: TraitItemKind :: Method ( _, ref body) => {
12371238 // Use call-site for extent (unless this is a
12381239 // trait method with no default; then fallback
12391240 // to the method id).
12401241 let extent = if let hir:: TraitMethod :: Provided ( body_id) = * body {
12411242 // 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 )
12431245 } else {
12441246 // 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)
12461248 } ;
12471249 tcx. construct_parameter_environment (
12481250 trait_item. span ,
@@ -1260,7 +1262,7 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
12601262 tcx. construct_parameter_environment (
12611263 item. span ,
12621264 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 ) )
12641266 }
12651267 hir:: ItemEnum ( ..) |
12661268 hir:: ItemStruct ( ..) |
@@ -1272,13 +1274,13 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
12721274 let def_id = tcx. hir . local_def_id ( id) ;
12731275 tcx. construct_parameter_environment ( item. span ,
12741276 def_id,
1275- tcx. region_maps ( ) . item_extent ( id) )
1277+ tcx. region_maps ( id ) . item_extent ( id) )
12761278 }
12771279 hir:: ItemTrait ( ..) => {
12781280 let def_id = tcx. hir . local_def_id ( id) ;
12791281 tcx. construct_parameter_environment ( item. span ,
12801282 def_id,
1281- tcx. region_maps ( ) . item_extent ( id) )
1283+ tcx. region_maps ( id ) . item_extent ( id) )
12821284 }
12831285 _ => {
12841286 span_bug ! ( item. span,
@@ -1296,7 +1298,7 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> {
12961298 tcx. construct_parameter_environment (
12971299 expr. span ,
12981300 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 ) )
13001302 } else {
13011303 tcx. empty_parameter_environment ( )
13021304 }
@@ -2560,7 +2562,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
25602562 }
25612563
25622564 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) ) )
25642566 }
25652567
25662568 pub fn visit_all_item_likes_in_krate < V , F > ( self ,
0 commit comments