pub struct EvalCtxt<'a, D, I = <D as SolverDelegate>::Interner>where
D: SolverDelegate<Interner = I>,
I: Interner,{ /* private fields */ }
Implementations§
Source§impl<D, I> EvalCtxt<'_, D>where
D: SolverDelegate<Interner = I>,
I: Interner,
impl<D, I> EvalCtxt<'_, D>where
D: SolverDelegate<Interner = I>,
I: Interner,
Sourcepub fn instantiate_normalizes_to_term(
&mut self,
goal: Goal<I, NormalizesTo<I>>,
term: I::Term,
)
pub fn instantiate_normalizes_to_term( &mut self, goal: Goal<I, NormalizesTo<I>>, term: I::Term, )
When normalizing an associated item, constrain the expected term to term
.
We know term
to always be a fully unconstrained inference variable, so
eq
should never fail here. However, in case term
contains aliases, we
emit nested AliasRelate
goals to structurally normalize the alias.
Sourcepub fn structurally_instantiate_normalizes_to_term(
&mut self,
goal: Goal<I, NormalizesTo<I>>,
term: AliasTerm<I>,
)
pub fn structurally_instantiate_normalizes_to_term( &mut self, goal: Goal<I, NormalizesTo<I>>, term: AliasTerm<I>, )
Unlike instantiate_normalizes_to_term
this instantiates the expected term
with a rigid alias. Using this is pretty much always wrong.
Auto Trait Implementations§
impl<'a, D, I> Freeze for EvalCtxt<'a, D, I>where
<I as Interner>::CanonicalVarKinds: Freeze,
<<D as SolverDelegate>::Infcx as InferCtxtLike>::OpaqueTypeStorageEntries: Freeze,
<I as Interner>::Span: Freeze,
<I as Interner>::GenericArgs: Freeze,
impl<'a, D, I> RefUnwindSafe for EvalCtxt<'a, D, I>where
<I as Interner>::CanonicalVarKinds: RefUnwindSafe,
<<D as SolverDelegate>::Infcx as InferCtxtLike>::OpaqueTypeStorageEntries: RefUnwindSafe,
<I as Interner>::Span: RefUnwindSafe,
D: RefUnwindSafe,
<I as Interner>::GenericArgs: RefUnwindSafe,
<I as Interner>::ParamEnv: RefUnwindSafe,
<I as Interner>::Predicate: RefUnwindSafe,
<I as Interner>::LocalDefIds: RefUnwindSafe,
<I as Interner>::GenericArg: RefUnwindSafe,
<I as Interner>::PredefinedOpaques: RefUnwindSafe,
<I as Interner>::ImplId: RefUnwindSafe,
<I as Interner>::ExternalConstraints: RefUnwindSafe,
impl<'a, D, I> Send for EvalCtxt<'a, D, I>where
<I as Interner>::CanonicalVarKinds: Send,
<<D as SolverDelegate>::Infcx as InferCtxtLike>::OpaqueTypeStorageEntries: Send,
<I as Interner>::Span: Send,
D: Sync + Send,
<I as Interner>::GenericArgs: Send,
<I as Interner>::ParamEnv: Send,
<I as Interner>::Predicate: Send,
<I as Interner>::LocalDefIds: Send,
<I as Interner>::PredefinedOpaques: Send,
<I as Interner>::GenericArg: Send,
<I as Interner>::ExternalConstraints: Send,
<I as Interner>::ImplId: Send,
impl<'a, D, I> Sync for EvalCtxt<'a, D, I>where
<I as Interner>::CanonicalVarKinds: Sync,
<<D as SolverDelegate>::Infcx as InferCtxtLike>::OpaqueTypeStorageEntries: Sync,
<I as Interner>::Span: Sync,
D: Sync,
<I as Interner>::GenericArgs: Sync,
<I as Interner>::ParamEnv: Sync,
<I as Interner>::Predicate: Sync,
<I as Interner>::LocalDefIds: Sync,
<I as Interner>::GenericArg: Sync,
<I as Interner>::PredefinedOpaques: Sync,
<I as Interner>::ImplId: Sync,
<I as Interner>::ExternalConstraints: Sync,
impl<'a, D, I> Unpin for EvalCtxt<'a, D, I>where
<I as Interner>::CanonicalVarKinds: Unpin,
<<D as SolverDelegate>::Infcx as InferCtxtLike>::OpaqueTypeStorageEntries: Unpin,
<I as Interner>::Span: Unpin,
<I as Interner>::GenericArgs: Unpin,
D: Unpin,
<I as Interner>::ParamEnv: Unpin,
<I as Interner>::Predicate: Unpin,
<I as Interner>::GenericArg: Unpin,
impl<'a, D, I = <D as SolverDelegate>::Interner> !UnwindSafe for EvalCtxt<'a, D, I>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more