Struct chalk_ir::UCanonical
source · pub struct UCanonical<T: HasInterner> {
pub canonical: Canonical<T>,
pub universes: usize,
}
Expand description
A “universe canonical” value. This is a wrapper around a
Canonical
, indicating that the universes within have been
“renumbered” to start from 0 and collapse unimportant
distinctions.
To produce one of these values, use the u_canonicalize
method.
Fields§
§canonical: Canonical<T>
The wrapped Canonical
.
universes: usize
The number of universes that have been collapsed.
Implementations§
source§impl<T: HasInterner> UCanonical<T>
impl<T: HasInterner> UCanonical<T>
sourcepub fn is_trivial_substitution(
&self,
interner: T::Interner,
canonical_subst: &Canonical<AnswerSubst<T::Interner>>,
) -> bool
pub fn is_trivial_substitution( &self, interner: T::Interner, canonical_subst: &Canonical<AnswerSubst<T::Interner>>, ) -> bool
Checks whether the universe canonical value is a trivial substitution (e.g. an identity substitution).
sourcepub fn trivial_substitution(
&self,
interner: T::Interner,
) -> Substitution<T::Interner>
pub fn trivial_substitution( &self, interner: T::Interner, ) -> Substitution<T::Interner>
Creates an identity substitution.
Trait Implementations§
source§impl<T: Clone + HasInterner> Clone for UCanonical<T>
impl<T: Clone + HasInterner> Clone for UCanonical<T>
source§fn clone(&self) -> UCanonical<T>
fn clone(&self) -> UCanonical<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug + HasInterner> Debug for UCanonical<T>
impl<T: Debug + HasInterner> Debug for UCanonical<T>
source§impl<T: Hash + HasInterner> Hash for UCanonical<T>
impl<T: Hash + HasInterner> Hash for UCanonical<T>
source§impl<T: PartialEq + HasInterner> PartialEq for UCanonical<T>
impl<T: PartialEq + HasInterner> PartialEq for UCanonical<T>
source§fn eq(&self, other: &UCanonical<T>) -> bool
fn eq(&self, other: &UCanonical<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: Eq + HasInterner> Eq for UCanonical<T>
impl<T: HasInterner> StructuralPartialEq for UCanonical<T>
Auto Trait Implementations§
impl<T> Freeze for UCanonical<T>
impl<T> RefUnwindSafe for UCanonical<T>where
T: RefUnwindSafe,
<<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: RefUnwindSafe,
impl<T> Send for UCanonical<T>
impl<T> Sync for UCanonical<T>
impl<T> Unpin for UCanonical<T>
impl<T> UnwindSafe for UCanonical<T>where
T: UnwindSafe,
<<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)