1
Fork 0

continue renaming

- `RegionVariableOrigin::~~Late~~BoundRegion`
- `~~Late~~BoundRegionConversionTime`
This commit is contained in:
lcnr 2023-11-13 14:01:16 +00:00
parent 86fa1317a3
commit dd0739aabe
16 changed files with 44 additions and 44 deletions

View file

@ -10,7 +10,7 @@ use rustc_hir as hir;
use rustc_hir::def::{CtorKind, Namespace}; use rustc_hir::def::{CtorKind, Namespace};
use rustc_hir::CoroutineKind; use rustc_hir::CoroutineKind;
use rustc_index::IndexSlice; use rustc_index::IndexSlice;
use rustc_infer::infer::LateBoundRegionConversionTime; use rustc_infer::infer::BoundRegionConversionTime;
use rustc_middle::mir::tcx::PlaceTy; use rustc_middle::mir::tcx::PlaceTy;
use rustc_middle::mir::{ use rustc_middle::mir::{
AggregateKind, CallSource, ConstOperand, FakeReadCause, Local, LocalInfo, LocalKind, Location, AggregateKind, CallSource, ConstOperand, FakeReadCause, Local, LocalInfo, LocalKind, Location,
@ -1113,7 +1113,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
&& let ty::Ref(_, _, hir::Mutability::Mut) = args.type_at(0).kind() && let ty::Ref(_, _, hir::Mutability::Mut) = args.type_at(0).kind()
&& let self_ty = self.infcx.instantiate_binder_with_fresh_vars( && let self_ty = self.infcx.instantiate_binder_with_fresh_vars(
fn_call_span, fn_call_span,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
tcx.fn_sig(method_did).instantiate(tcx, method_args).input(0), tcx.fn_sig(method_did).instantiate(tcx, method_args).input(0),
) )
&& self.infcx.can_eq(self.param_env, ty, self_ty) && self.infcx.can_eq(self.param_env, ty, self_ty)

View file

@ -7,7 +7,7 @@
//! `RETURN_PLACE` the MIR arguments) are always fully normalized (and //! `RETURN_PLACE` the MIR arguments) are always fully normalized (and
//! contain revealed `impl Trait` values). //! contain revealed `impl Trait` values).
use rustc_infer::infer::LateBoundRegionConversionTime; use rustc_infer::infer::BoundRegionConversionTime;
use rustc_middle::mir::*; use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_span::Span; use rustc_span::Span;
@ -35,7 +35,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
.instantiate_canonical_with_fresh_inference_vars(body.span, &user_provided_poly_sig); .instantiate_canonical_with_fresh_inference_vars(body.span, &user_provided_poly_sig);
let user_provided_sig = self.infcx.instantiate_binder_with_fresh_vars( let user_provided_sig = self.infcx.instantiate_binder_with_fresh_vars(
body.span, body.span,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
user_provided_sig, user_provided_sig,
); );

View file

@ -21,7 +21,7 @@ use rustc_infer::infer::outlives::env::RegionBoundPairs;
use rustc_infer::infer::region_constraints::RegionConstraintData; use rustc_infer::infer::region_constraints::RegionConstraintData;
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::{ use rustc_infer::infer::{
InferCtxt, LateBoundRegion, LateBoundRegionConversionTime, NllRegionVariableOrigin, BoundRegion, BoundRegionConversionTime, InferCtxt, NllRegionVariableOrigin,
}; };
use rustc_middle::mir::tcx::PlaceTy; use rustc_middle::mir::tcx::PlaceTy;
use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor}; use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor};
@ -1401,10 +1401,10 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
}; };
self.infcx.next_region_var( self.infcx.next_region_var(
LateBoundRegion( BoundRegion(
term.source_info.span, term.source_info.span,
br.kind, br.kind,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
), ),
region_ctxt_fn, region_ctxt_fn,
) )

View file

@ -7,7 +7,7 @@ use rustc_hir as hir;
use rustc_hir::lang_items::LangItem; use rustc_hir::lang_items::LangItem;
use rustc_hir_analysis::astconv::AstConv; use rustc_hir_analysis::astconv::AstConv;
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::{DefineOpaqueTypes, LateBoundRegionConversionTime}; use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes};
use rustc_infer::infer::{InferOk, InferResult}; use rustc_infer::infer::{InferOk, InferResult};
use rustc_macros::{TypeFoldable, TypeVisitable}; use rustc_macros::{TypeFoldable, TypeVisitable};
use rustc_middle::ty::visit::{TypeVisitable, TypeVisitableExt}; use rustc_middle::ty::visit::{TypeVisitable, TypeVisitableExt};
@ -558,7 +558,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Instantiate (this part of..) S to S', i.e., with fresh variables. // Instantiate (this part of..) S to S', i.e., with fresh variables.
self.instantiate_binder_with_fresh_vars( self.instantiate_binder_with_fresh_vars(
hir_ty.span, hir_ty.span,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
// (*) binder moved to here // (*) binder moved to here
supplied_sig.inputs().rebind(supplied_ty), supplied_sig.inputs().rebind(supplied_ty),
) )
@ -583,7 +583,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let supplied_output_ty = self.instantiate_binder_with_fresh_vars( let supplied_output_ty = self.instantiate_binder_with_fresh_vars(
decl.output.span(), decl.output.span(),
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
supplied_sig.output(), supplied_sig.output(),
); );
let cause = &self.misc(decl.output.span()); let cause = &self.misc(decl.output.span());

View file

@ -564,7 +564,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let span = args.get(i).map(|a| a.span).unwrap_or(expr.span); let span = args.get(i).map(|a| a.span).unwrap_or(expr.span);
let input = self.instantiate_binder_with_fresh_vars( let input = self.instantiate_binder_with_fresh_vars(
span, span,
infer::LateBoundRegionConversionTime::FnCall, infer::BoundRegionConversionTime::FnCall,
fn_sig.input(i), fn_sig.input(i),
); );
self.require_type_is_sized_deferred( self.require_type_is_sized_deferred(
@ -582,7 +582,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// with fresh vars. // with fresh vars.
let output = self.instantiate_binder_with_fresh_vars( let output = self.instantiate_binder_with_fresh_vars(
expr.span, expr.span,
infer::LateBoundRegionConversionTime::FnCall, infer::BoundRegionConversionTime::FnCall,
fn_sig.output(), fn_sig.output(),
); );
self.require_type_is_sized_deferred(output, expr.span, traits::SizedReturnType); self.require_type_is_sized_deferred(output, expr.span, traits::SizedReturnType);

View file

@ -289,7 +289,7 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
) -> Ty<'tcx> { ) -> Ty<'tcx> {
let trait_ref = self.instantiate_binder_with_fresh_vars( let trait_ref = self.instantiate_binder_with_fresh_vars(
span, span,
infer::LateBoundRegionConversionTime::AssocTypeProjection(item_def_id), infer::BoundRegionConversionTime::AssocTypeProjection(item_def_id),
poly_trait_ref, poly_trait_ref,
); );

View file

@ -853,7 +853,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
self.elaborate_bounds(bounds, |this, poly_trait_ref, item| { self.elaborate_bounds(bounds, |this, poly_trait_ref, item| {
let trait_ref = this.instantiate_binder_with_fresh_vars( let trait_ref = this.instantiate_binder_with_fresh_vars(
this.span, this.span,
infer::LateBoundRegionConversionTime::FnCall, infer::BoundRegionConversionTime::FnCall,
poly_trait_ref, poly_trait_ref,
); );
@ -971,7 +971,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
} else { } else {
let new_trait_ref = self.instantiate_binder_with_fresh_vars( let new_trait_ref = self.instantiate_binder_with_fresh_vars(
self.span, self.span,
infer::LateBoundRegionConversionTime::FnCall, infer::BoundRegionConversionTime::FnCall,
bound_trait_ref, bound_trait_ref,
); );

View file

@ -2768,13 +2768,13 @@ impl<'tcx> InferCtxt<'tcx> {
infer::AddrOfRegion(_) => " for borrow expression".to_string(), infer::AddrOfRegion(_) => " for borrow expression".to_string(),
infer::Autoref(_) => " for autoref".to_string(), infer::Autoref(_) => " for autoref".to_string(),
infer::Coercion(_) => " for automatic coercion".to_string(), infer::Coercion(_) => " for automatic coercion".to_string(),
infer::LateBoundRegion(_, br, infer::FnCall) => { infer::BoundRegion(_, br, infer::FnCall) => {
format!(" for lifetime parameter {}in function call", br_string(br)) format!(" for lifetime parameter {}in function call", br_string(br))
} }
infer::LateBoundRegion(_, br, infer::HigherRankedType) => { infer::BoundRegion(_, br, infer::HigherRankedType) => {
format!(" for lifetime parameter {}in generic type", br_string(br)) format!(" for lifetime parameter {}in generic type", br_string(br))
} }
infer::LateBoundRegion(_, br, infer::AssocTypeProjection(def_id)) => format!( infer::BoundRegion(_, br, infer::AssocTypeProjection(def_id)) => format!(
" for lifetime parameter {}in trait containing associated type `{}`", " for lifetime parameter {}in trait containing associated type `{}`",
br_string(br), br_string(br),
self.tcx.associated_item(def_id).name self.tcx.associated_item(def_id).name

View file

@ -1,7 +1,7 @@
pub use self::at::DefineOpaqueTypes; pub use self::at::DefineOpaqueTypes;
pub use self::freshen::TypeFreshener; pub use self::freshen::TypeFreshener;
pub use self::lexical_region_resolve::RegionResolutionError; pub use self::lexical_region_resolve::RegionResolutionError;
pub use self::LateBoundRegionConversionTime::*; pub use self::BoundRegionConversionTime::*;
pub use self::RegionVariableOrigin::*; pub use self::RegionVariableOrigin::*;
pub use self::SubregionOrigin::*; pub use self::SubregionOrigin::*;
pub use self::ValuePairs::*; pub use self::ValuePairs::*;
@ -472,9 +472,9 @@ impl<'tcx> SubregionOrigin<'tcx> {
} }
} }
/// Times when we replace late-bound regions with variables: /// Times when we replace bound regions with existentials:
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub enum LateBoundRegionConversionTime { pub enum BoundRegionConversionTime {
/// when a fn is called /// when a fn is called
FnCall, FnCall,
@ -510,9 +510,9 @@ pub enum RegionVariableOrigin {
/// Region variables created as the values for early-bound regions. /// Region variables created as the values for early-bound regions.
EarlyBoundRegion(Span, Symbol), EarlyBoundRegion(Span, Symbol),
/// Region variables created for bound regions /// Region variables created when instantiating a binder with
/// in a function or method that is called. /// existential variables, e.g. when calling a function or method.
LateBoundRegion(Span, ty::BoundRegionKind, LateBoundRegionConversionTime), BoundRegion(Span, ty::BoundRegionKind, BoundRegionConversionTime),
UpvarRegion(ty::UpvarId, Span), UpvarRegion(ty::UpvarId, Span),
@ -1456,13 +1456,13 @@ impl<'tcx> InferCtxt<'tcx> {
// variables in the current universe. // variables in the current universe.
// //
// Use this method if you'd like to find some substitution of the binder's // Use this method if you'd like to find some substitution of the binder's
// variables (e.g. during a method call). If there isn't a [`LateBoundRegionConversionTime`] // variables (e.g. during a method call). If there isn't a [`BoundRegionConversionTime`]
// that corresponds to your use case, consider whether or not you should // that corresponds to your use case, consider whether or not you should
// use [`InferCtxt::instantiate_binder_with_placeholders`] instead. // use [`InferCtxt::instantiate_binder_with_placeholders`] instead.
pub fn instantiate_binder_with_fresh_vars<T>( pub fn instantiate_binder_with_fresh_vars<T>(
&self, &self,
span: Span, span: Span,
lbrct: LateBoundRegionConversionTime, lbrct: BoundRegionConversionTime,
value: ty::Binder<'tcx, T>, value: ty::Binder<'tcx, T>,
) -> T ) -> T
where where
@ -1475,7 +1475,7 @@ impl<'tcx> InferCtxt<'tcx> {
struct ToFreshVars<'a, 'tcx> { struct ToFreshVars<'a, 'tcx> {
infcx: &'a InferCtxt<'tcx>, infcx: &'a InferCtxt<'tcx>,
span: Span, span: Span,
lbrct: LateBoundRegionConversionTime, lbrct: BoundRegionConversionTime,
map: FxHashMap<ty::BoundVar, ty::GenericArg<'tcx>>, map: FxHashMap<ty::BoundVar, ty::GenericArg<'tcx>>,
} }
@ -1485,7 +1485,7 @@ impl<'tcx> InferCtxt<'tcx> {
.entry(br.var) .entry(br.var)
.or_insert_with(|| { .or_insert_with(|| {
self.infcx self.infcx
.next_region_var(LateBoundRegion(self.span, br.kind, self.lbrct)) .next_region_var(BoundRegion(self.span, br.kind, self.lbrct))
.into() .into()
}) })
.expect_region() .expect_region()
@ -2042,7 +2042,7 @@ impl RegionVariableOrigin {
| Autoref(a) | Autoref(a)
| Coercion(a) | Coercion(a)
| EarlyBoundRegion(a, ..) | EarlyBoundRegion(a, ..)
| LateBoundRegion(a, ..) | BoundRegion(a, ..)
| UpvarRegion(_, a) => a, | UpvarRegion(_, a) => a,
Nll(..) => bug!("NLL variable used with `span`"), Nll(..) => bug!("NLL variable used with `span`"),
} }

View file

@ -4,7 +4,7 @@ use rustc_infer::infer::at::ToTrace;
use rustc_infer::infer::canonical::CanonicalVarValues; use rustc_infer::infer::canonical::CanonicalVarValues;
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::{ use rustc_infer::infer::{
DefineOpaqueTypes, InferCtxt, InferOk, LateBoundRegionConversionTime, TyCtxtInferExt, BoundRegionConversionTime, DefineOpaqueTypes, InferCtxt, InferOk, TyCtxtInferExt,
}; };
use rustc_infer::traits::query::NoSolution; use rustc_infer::traits::query::NoSolution;
use rustc_infer::traits::ObligationCause; use rustc_infer::traits::ObligationCause;
@ -780,7 +780,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
) -> T { ) -> T {
self.infcx.instantiate_binder_with_fresh_vars( self.infcx.instantiate_binder_with_fresh_vars(
DUMMY_SP, DUMMY_SP,
LateBoundRegionConversionTime::HigherRankedType, BoundRegionConversionTime::HigherRankedType,
value, value,
) )
} }

View file

@ -1,5 +1,5 @@
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
use rustc_infer::infer::{InferCtxt, LateBoundRegionConversionTime}; use rustc_infer::infer::{BoundRegionConversionTime, InferCtxt};
use rustc_infer::traits::util::elaborate; use rustc_infer::traits::util::elaborate;
use rustc_infer::traits::{Obligation, ObligationCause, PolyTraitObligation}; use rustc_infer::traits::{Obligation, ObligationCause, PolyTraitObligation};
use rustc_middle::ty; use rustc_middle::ty;
@ -53,7 +53,7 @@ pub fn recompute_applicable_impls<'tcx>(
let param_env_predicate = infcx.instantiate_binder_with_fresh_vars( let param_env_predicate = infcx.instantiate_binder_with_fresh_vars(
DUMMY_SP, DUMMY_SP,
LateBoundRegionConversionTime::HigherRankedType, BoundRegionConversionTime::HigherRankedType,
poly_trait_predicate, poly_trait_predicate,
); );
let param_env_trait_ref = let param_env_trait_ref =

View file

@ -26,7 +26,7 @@ use rustc_hir::{CoroutineKind, CoroutineSource, Node};
use rustc_hir::{Expr, HirId}; use rustc_hir::{Expr, HirId};
use rustc_infer::infer::error_reporting::TypeErrCtxt; use rustc_infer::infer::error_reporting::TypeErrCtxt;
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::{DefineOpaqueTypes, InferOk, LateBoundRegionConversionTime}; use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes, InferOk};
use rustc_middle::hir::map; use rustc_middle::hir::map;
use rustc_middle::traits::IsConstable; use rustc_middle::traits::IsConstable;
use rustc_middle::ty::error::TypeError::{self, Sorts}; use rustc_middle::ty::error::TypeError::{self, Sorts};
@ -908,7 +908,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let self_ty = self.instantiate_binder_with_fresh_vars( let self_ty = self.instantiate_binder_with_fresh_vars(
DUMMY_SP, DUMMY_SP,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
trait_pred.self_ty(), trait_pred.self_ty(),
); );
@ -1237,7 +1237,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let output = self.instantiate_binder_with_fresh_vars( let output = self.instantiate_binder_with_fresh_vars(
DUMMY_SP, DUMMY_SP,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
output, output,
); );
let inputs = inputs let inputs = inputs
@ -1246,7 +1246,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
.map(|ty| { .map(|ty| {
self.instantiate_binder_with_fresh_vars( self.instantiate_binder_with_fresh_vars(
DUMMY_SP, DUMMY_SP,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
inputs.rebind(*ty), inputs.rebind(*ty),
) )
}) })
@ -3595,7 +3595,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let where_pred = self.instantiate_binder_with_placeholders(where_pred); let where_pred = self.instantiate_binder_with_placeholders(where_pred);
let failed_pred = self.instantiate_binder_with_fresh_vars( let failed_pred = self.instantiate_binder_with_fresh_vars(
expr.span, expr.span,
LateBoundRegionConversionTime::FnCall, BoundRegionConversionTime::FnCall,
failed_pred, failed_pred,
); );

View file

@ -1377,7 +1377,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
{ {
let data = self.instantiate_binder_with_fresh_vars( let data = self.instantiate_binder_with_fresh_vars(
obligation.cause.span, obligation.cause.span,
infer::LateBoundRegionConversionTime::HigherRankedType, infer::BoundRegionConversionTime::HigherRankedType,
bound_predicate.rebind(data), bound_predicate.rebind(data),
); );
let unnormalized_term = match data.term.unpack() { let unnormalized_term = match data.term.unpack() {

View file

@ -18,7 +18,7 @@ use rustc_middle::traits::ImplSourceUserDefinedData;
use crate::errors::InherentProjectionNormalizationOverflow; use crate::errors::InherentProjectionNormalizationOverflow;
use crate::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use crate::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use crate::infer::{InferCtxt, InferOk, LateBoundRegionConversionTime}; use crate::infer::{BoundRegionConversionTime, InferCtxt, InferOk};
use crate::traits::error_reporting::TypeErrCtxtExt as _; use crate::traits::error_reporting::TypeErrCtxtExt as _;
use crate::traits::query::evaluate_obligation::InferCtxtExt as _; use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
use crate::traits::select::ProjectionMatchesProjection; use crate::traits::select::ProjectionMatchesProjection;
@ -2319,7 +2319,7 @@ fn confirm_param_env_candidate<'cx, 'tcx>(
let cache_entry = infcx.instantiate_binder_with_fresh_vars( let cache_entry = infcx.instantiate_binder_with_fresh_vars(
cause.span, cause.span,
LateBoundRegionConversionTime::HigherRankedType, BoundRegionConversionTime::HigherRankedType,
poly_cache_entry, poly_cache_entry,
); );

View file

@ -9,7 +9,7 @@
use rustc_ast::Mutability; use rustc_ast::Mutability;
use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_hir::lang_items::LangItem; use rustc_hir::lang_items::LangItem;
use rustc_infer::infer::LateBoundRegionConversionTime::HigherRankedType; use rustc_infer::infer::BoundRegionConversionTime::HigherRankedType;
use rustc_infer::infer::{DefineOpaqueTypes, InferOk}; use rustc_infer::infer::{DefineOpaqueTypes, InferOk};
use rustc_middle::traits::{BuiltinImplSource, SelectionOutputTypeParameterMismatch}; use rustc_middle::traits::{BuiltinImplSource, SelectionOutputTypeParameterMismatch};
use rustc_middle::ty::{ use rustc_middle::ty::{

View file

@ -32,8 +32,8 @@ use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_errors::Diagnostic; use rustc_errors::Diagnostic;
use rustc_hir as hir; use rustc_hir as hir;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
use rustc_infer::infer::BoundRegionConversionTime;
use rustc_infer::infer::DefineOpaqueTypes; use rustc_infer::infer::DefineOpaqueTypes;
use rustc_infer::infer::LateBoundRegionConversionTime;
use rustc_infer::traits::TraitObligation; use rustc_infer::traits::TraitObligation;
use rustc_middle::dep_graph::dep_kinds; use rustc_middle::dep_graph::dep_kinds;
use rustc_middle::dep_graph::DepNodeIndex; use rustc_middle::dep_graph::DepNodeIndex;
@ -1751,7 +1751,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let mut nested_obligations = Vec::new(); let mut nested_obligations = Vec::new();
let infer_predicate = self.infcx.instantiate_binder_with_fresh_vars( let infer_predicate = self.infcx.instantiate_binder_with_fresh_vars(
obligation.cause.span, obligation.cause.span,
LateBoundRegionConversionTime::HigherRankedType, BoundRegionConversionTime::HigherRankedType,
env_predicate, env_predicate,
); );
let infer_projection = if potentially_unnormalized_candidates { let infer_projection = if potentially_unnormalized_candidates {