Enum chalk_ir::WhereClause [−][src]
pub enum WhereClause<I: Interner> { Implemented(TraitRef<I>), AliasEq(AliasEq<I>), LifetimeOutlives(LifetimeOutlives<I>), TypeOutlives(TypeOutlives<I>), }
Expand description
Where clauses that can be written by a Rust programmer.
Variants
Implemented(TraitRef<I>)
Type implements a trait.
AliasEq(AliasEq<I>)
Type is equal to an alias.
LifetimeOutlives(LifetimeOutlives<I>)
One lifetime outlives another.
TypeOutlives(TypeOutlives<I>)
Type outlives a lifetime.
Implementations
Turn a where clause into the WF version of it i.e.:
Implemented(T: Trait)
maps toWellFormed(T: Trait)
ProjectionEq(<T as Trait>::Item = Foo)
maps toWellFormed(<T as Trait>::Item = Foo)
- any other clause maps to itself
Same as into_well_formed_goal
but with the FromEnv
predicate instead of WellFormed
.
Trait Implementations
Cast a value to type T
.
Cast a value to type T
.
Cast a value to type T
.
Cast a value to type T
.
Cast a value to type T
.
type Result = WhereClause<I>
type Result = WhereClause<I>
The type of value that will be produced once folding is done.
Typically this is Self
, unless Self
contains borrowed
values, in which case owned values are produced (for example,
one can fold over a &T
value where T: Fold
, in which case
you get back a T
, not a &T
). Read more
Apply the given folder folder
to self
; binders
is the
number of binders that are in scope when beginning the
folder. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs. Read more
type Interner = I
type Interner = I
The interner associated with the type.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
fn super_visit_with<'i, B>(
&self,
visitor: &mut dyn Visitor<'i, I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B> where
I: 'i,
[src]
fn super_visit_with<'i, B>(
&self,
visitor: &mut dyn Visitor<'i, I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B> where
I: 'i,
[src]Recursively visits the type contents.
fn visit_with<'i, B>(
&self,
visitor: &mut dyn Visitor<'i, I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B> where
I: 'i,
[src]
fn visit_with<'i, B>(
&self,
visitor: &mut dyn Visitor<'i, I, BreakTy = B>,
outer_binder: DebruijnIndex
) -> ControlFlow<B> where
I: 'i,
[src]Apply the given visitor visitor
to self
; binders
is the
number of binders that are in scope when beginning the
visitor. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs. Read more
impl<I: Interner> Copy for WhereClause<I> where
I::InternedSubstitution: Copy,
I::InternedLifetime: Copy,
I::InternedType: Copy,
[src]Auto Trait Implementations
impl<I> RefUnwindSafe for WhereClause<I> where
<I as Interner>::DefId: RefUnwindSafe,
<I as Interner>::InternedLifetime: RefUnwindSafe,
<I as Interner>::InternedSubstitution: RefUnwindSafe,
<I as Interner>::InternedType: RefUnwindSafe,
impl<I> Send for WhereClause<I> where
<I as Interner>::DefId: Send,
<I as Interner>::InternedLifetime: Send,
<I as Interner>::InternedSubstitution: Send,
<I as Interner>::InternedType: Send,
impl<I> Sync for WhereClause<I> where
<I as Interner>::DefId: Sync,
<I as Interner>::InternedLifetime: Sync,
<I as Interner>::InternedSubstitution: Sync,
<I as Interner>::InternedType: Sync,
impl<I> Unpin for WhereClause<I> where
<I as Interner>::DefId: Unpin,
<I as Interner>::InternedLifetime: Unpin,
<I as Interner>::InternedSubstitution: Unpin,
<I as Interner>::InternedType: Unpin,
impl<I> UnwindSafe for WhereClause<I> where
<I as Interner>::DefId: UnwindSafe,
<I as Interner>::InternedLifetime: UnwindSafe,
<I as Interner>::InternedSubstitution: UnwindSafe,
<I as Interner>::InternedType: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Cast a value to type U
using CastTo
.
Cast a value to type T
.
Cast a value to type T
.
impl<T, I> CouldMatch<T> for T where
T: Zip<I> + HasInterner<Interner = I> + ?Sized,
I: Interner,
[src]
impl<T, I> CouldMatch<T> for T where
T: Zip<I> + HasInterner<Interner = I> + ?Sized,
I: Interner,
[src]Checks whether self
and other
could possibly match.
Shifts this term in one level of binders.
Shifts a term valid at outer_binder
so that it is
valid at the innermost binder. See DebruijnIndex::shifted_in_from
for a detailed explanation. Read more
Shifts a term valid at the innermost binder so that it is
valid at outer_binder
. See DebruijnIndex::shifted_out_to
for a detailed explanation. Read more
Shifts this term out one level of binders.