@@ -14,7 +14,7 @@ use crate::errors::{
14
14
AmbiguousLifetimeBound , MultipleRelaxedDefaultBounds , TraitObjectDeclaredWithNoTraits ,
15
15
TypeofReservedKeywordUsed , ValueOfAssociatedStructAlreadySpecified ,
16
16
} ;
17
- use crate :: middle:: resolve_lifetime as rl ;
17
+ use crate :: middle:: resolve_bound_vars as rbv ;
18
18
use crate :: require_c_abi_if_c_variadic;
19
19
use rustc_ast:: TraitObjectSyntax ;
20
20
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
@@ -225,10 +225,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
225
225
let tcx = self . tcx ( ) ;
226
226
let lifetime_name = |def_id| tcx. hir ( ) . name ( tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ) ;
227
227
228
- match tcx. named_region ( lifetime. hir_id ) {
229
- Some ( rl :: Region :: Static ) => tcx. lifetimes . re_static ,
228
+ match tcx. named_bound_var ( lifetime. hir_id ) {
229
+ Some ( rbv :: ResolvedArg :: StaticLifetime ) => tcx. lifetimes . re_static ,
230
230
231
- Some ( rl :: Region :: LateBound ( debruijn, index, def_id) ) => {
231
+ Some ( rbv :: ResolvedArg :: LateBound ( debruijn, index, def_id) ) => {
232
232
let name = lifetime_name ( def_id. expect_local ( ) ) ;
233
233
let br = ty:: BoundRegion {
234
234
var : ty:: BoundVar :: from_u32 ( index) ,
@@ -237,15 +237,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
237
237
tcx. mk_region ( ty:: ReLateBound ( debruijn, br) )
238
238
}
239
239
240
- Some ( rl :: Region :: EarlyBound ( def_id) ) => {
240
+ Some ( rbv :: ResolvedArg :: EarlyBound ( def_id) ) => {
241
241
let name = tcx. hir ( ) . ty_param_name ( def_id. expect_local ( ) ) ;
242
242
let item_def_id = tcx. hir ( ) . ty_param_owner ( def_id. expect_local ( ) ) ;
243
243
let generics = tcx. generics_of ( item_def_id) ;
244
244
let index = generics. param_def_id_to_index [ & def_id] ;
245
245
tcx. mk_region ( ty:: ReEarlyBound ( ty:: EarlyBoundRegion { def_id, index, name } ) )
246
246
}
247
247
248
- Some ( rl :: Region :: Free ( scope, id) ) => {
248
+ Some ( rbv :: ResolvedArg :: Free ( scope, id) ) => {
249
249
let name = lifetime_name ( id. expect_local ( ) ) ;
250
250
tcx. mk_region ( ty:: ReFree ( ty:: FreeRegion {
251
251
scope,
@@ -1604,7 +1604,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1604
1604
self . ast_region_to_region ( lifetime, None )
1605
1605
} else {
1606
1606
self . compute_object_lifetime_bound ( span, existential_predicates) . unwrap_or_else ( || {
1607
- if tcx. named_region ( lifetime. hir_id ) . is_some ( ) {
1607
+ if tcx. named_bound_var ( lifetime. hir_id ) . is_some ( ) {
1608
1608
self . ast_region_to_region ( lifetime, None )
1609
1609
} else {
1610
1610
self . re_infer ( None , span) . unwrap_or_else ( || {
0 commit comments