pub enum CanonicalTy {
Constr(CanonicalConstrTy),
Exists(Binder<CanonicalConstrTy>),
}
Expand description
A (shallowly) canonicalized type. This can be either of the form {T | p}
or ∃v0,…,vn. {T | p}
,
where T
doesnt have any (shallow) existential or constraint types.
When canonicalizing a type without a constraint type, p
will be Expr::tt()
.
Variants§
Constr(CanonicalConstrTy)
A type of the form {T | p}
Exists(Binder<CanonicalConstrTy>)
A type of the form ∃v0,…,vn. {T | p}
Implementations§
Source§impl CanonicalTy
impl CanonicalTy
Trait Implementations§
Source§impl Debug for CanonicalTy
impl Debug for CanonicalTy
Source§impl Pretty for CanonicalTy
impl Pretty for CanonicalTy
Source§impl TypeVisitable for CanonicalTy
impl TypeVisitable for CanonicalTy
fn visit_with<__V: TypeVisitor>( &self, __visitor: &mut __V, ) -> ControlFlow<__V::BreakTy>
fn has_escaping_bvars(&self) -> bool
Source§fn has_escaping_bvars_at_or_above(&self, binder: DebruijnIndex) -> bool
fn has_escaping_bvars_at_or_above(&self, binder: DebruijnIndex) -> bool
Returns
true
if self
has any late-bound vars that are either
bound by binder
or bound by some binder outside of binder
.
If binder
is ty::INNERMOST
, this indicates whether
there are any late-bound vars that appear free.Source§fn fvars(&self) -> FxHashSet<Name>
fn fvars(&self) -> FxHashSet<Name>
Returns the set of all free variables.
For example,
Vec<i32[n]>{v : v > m}
returns {n, m}
.fn early_params(&self) -> FxHashSet<EarlyReftParam>
Source§fn redundant_bvars(&self) -> FxHashSet<BoundVar>
fn redundant_bvars(&self) -> FxHashSet<BoundVar>
Gives the indices of the provided bvars which: Read more
Auto Trait Implementations§
impl Freeze for CanonicalTy
impl RefUnwindSafe for CanonicalTy
impl Send for CanonicalTy
impl Sync for CanonicalTy
impl Unpin for CanonicalTy
impl UnwindSafe for CanonicalTy
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more