@@ -97,7 +97,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
97
97
)
98
98
} ;
99
99
let span = scope. span ( self , region_scope_tree) ;
100
- let tag = match self . hir . find ( scope. node_id ( self , region_scope_tree) ) {
100
+ let tag = match self . hir ( ) . find ( scope. node_id ( self , region_scope_tree) ) {
101
101
Some ( Node :: Block ( _) ) => "block" ,
102
102
Some ( Node :: Expr ( expr) ) => match expr. node {
103
103
hir:: ExprKind :: Call ( ..) => "call" ,
@@ -190,8 +190,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
190
190
let cm = self . sess . source_map ( ) ;
191
191
192
192
let scope = region. free_region_binding_scope ( self ) ;
193
- let node = self . hir . as_local_node_id ( scope) . unwrap_or ( DUMMY_NODE_ID ) ;
194
- let tag = match self . hir . find ( node) {
193
+ let node = self . hir ( ) . as_local_node_id ( scope) . unwrap_or ( DUMMY_NODE_ID ) ;
194
+ let tag = match self . hir ( ) . find ( node) {
195
195
Some ( Node :: Block ( _) ) | Some ( Node :: Expr ( _) ) => "body" ,
196
196
Some ( Node :: Item ( it) ) => Self :: item_scope_tag ( & it) ,
197
197
Some ( Node :: TraitItem ( it) ) => Self :: trait_item_scope_tag ( & it) ,
@@ -200,8 +200,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
200
200
} ;
201
201
let ( prefix, span) = match * region {
202
202
ty:: ReEarlyBound ( ref br) => {
203
- let mut sp = cm. def_span ( self . hir . span ( node) ) ;
204
- if let Some ( param) = self . hir
203
+ let mut sp = cm. def_span ( self . hir ( ) . span ( node) ) ;
204
+ if let Some ( param) = self . hir ( )
205
205
. get_generics ( scope)
206
206
. and_then ( |generics| generics. get_named ( & br. name ) )
207
207
{
@@ -213,8 +213,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
213
213
bound_region : ty:: BoundRegion :: BrNamed ( _, ref name) ,
214
214
..
215
215
} ) => {
216
- let mut sp = cm. def_span ( self . hir . span ( node) ) ;
217
- if let Some ( param) = self . hir
216
+ let mut sp = cm. def_span ( self . hir ( ) . span ( node) ) ;
217
+ if let Some ( param) = self . hir ( )
218
218
. get_generics ( scope)
219
219
. and_then ( |generics| generics. get_named ( & name) )
220
220
{
@@ -225,15 +225,15 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
225
225
ty:: ReFree ( ref fr) => match fr. bound_region {
226
226
ty:: BrAnon ( idx) => (
227
227
format ! ( "the anonymous lifetime #{} defined on" , idx + 1 ) ,
228
- self . hir . span ( node) ,
228
+ self . hir ( ) . span ( node) ,
229
229
) ,
230
230
ty:: BrFresh ( _) => (
231
231
"an anonymous lifetime defined on" . to_owned ( ) ,
232
- self . hir . span ( node) ,
232
+ self . hir ( ) . span ( node) ,
233
233
) ,
234
234
_ => (
235
235
format ! ( "the lifetime {} as defined on" , fr. bound_region) ,
236
- cm. def_span ( self . hir . span ( node) ) ,
236
+ cm. def_span ( self . hir ( ) . span ( node) ) ,
237
237
) ,
238
238
} ,
239
239
_ => bug ! ( ) ,
@@ -1083,7 +1083,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1083
1083
// the expected type argument.
1084
1084
if !param. is_self ( ) {
1085
1085
let type_param = generics. type_param ( param, self . tcx ) ;
1086
- let hir = & self . tcx . hir ;
1086
+ let hir = & self . tcx . hir ( ) ;
1087
1087
hir. as_local_node_id ( type_param. def_id ) . map ( |id| {
1088
1088
// Get the `hir::Param` to verify whether it already has any bounds.
1089
1089
// We do this to avoid suggesting code that ends up as `T: 'a'b`,
@@ -1315,8 +1315,8 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1315
1315
format ! ( " for lifetime parameter `{}` in coherence check" , name)
1316
1316
}
1317
1317
infer:: UpvarRegion ( ref upvar_id, _) => {
1318
- let var_node_id = self . tcx . hir . hir_to_node_id ( upvar_id. var_path . hir_id ) ;
1319
- let var_name = self . tcx . hir . name ( var_node_id) ;
1318
+ let var_node_id = self . tcx . hir ( ) . hir_to_node_id ( upvar_id. var_path . hir_id ) ;
1319
+ let var_name = self . tcx . hir ( ) . name ( var_node_id) ;
1320
1320
format ! ( " for capture of `{}` by closure" , var_name)
1321
1321
}
1322
1322
infer:: NLL ( ..) => bug ! ( "NLL variable found in lexical phase" ) ,
0 commit comments