@@ -14,7 +14,7 @@ use crate::errors::{
1414 AmbiguousLifetimeBound , MultipleRelaxedDefaultBounds , TraitObjectDeclaredWithNoTraits ,
1515 TypeofReservedKeywordUsed , ValueOfAssociatedStructAlreadySpecified ,
1616} ;
17- use crate :: middle:: resolve_lifetime as rl ;
17+ use crate :: middle:: resolve_bound_vars as rbv ;
1818use crate :: require_c_abi_if_c_variadic;
1919use rustc_ast:: TraitObjectSyntax ;
2020use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
@@ -225,10 +225,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
225225 let tcx = self . tcx ( ) ;
226226 let lifetime_name = |def_id| tcx. hir ( ) . name ( tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ) ;
227227
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 ,
230230
231- Some ( rl :: Region :: LateBound ( debruijn, index, def_id) ) => {
231+ Some ( rbv :: ResolvedArg :: LateBound ( debruijn, index, def_id) ) => {
232232 let name = lifetime_name ( def_id. expect_local ( ) ) ;
233233 let br = ty:: BoundRegion {
234234 var : ty:: BoundVar :: from_u32 ( index) ,
@@ -237,15 +237,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
237237 tcx. mk_region ( ty:: ReLateBound ( debruijn, br) )
238238 }
239239
240- Some ( rl :: Region :: EarlyBound ( def_id) ) => {
240+ Some ( rbv :: ResolvedArg :: EarlyBound ( def_id) ) => {
241241 let name = tcx. hir ( ) . ty_param_name ( def_id. expect_local ( ) ) ;
242242 let item_def_id = tcx. hir ( ) . ty_param_owner ( def_id. expect_local ( ) ) ;
243243 let generics = tcx. generics_of ( item_def_id) ;
244244 let index = generics. param_def_id_to_index [ & def_id] ;
245245 tcx. mk_region ( ty:: ReEarlyBound ( ty:: EarlyBoundRegion { def_id, index, name } ) )
246246 }
247247
248- Some ( rl :: Region :: Free ( scope, id) ) => {
248+ Some ( rbv :: ResolvedArg :: Free ( scope, id) ) => {
249249 let name = lifetime_name ( id. expect_local ( ) ) ;
250250 tcx. mk_region ( ty:: ReFree ( ty:: FreeRegion {
251251 scope,
@@ -1604,7 +1604,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
16041604 self . ast_region_to_region ( lifetime, None )
16051605 } else {
16061606 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 ( ) {
16081608 self . ast_region_to_region ( lifetime, None )
16091609 } else {
16101610 self . re_infer ( None , span) . unwrap_or_else ( || {
0 commit comments