pub enum MirCtor {
User(CtorId),
Builtin(BuiltinCtor),
}Expand description
Typed identity for a constructor reference inside MIR. Two
flavors: user-declared variants identified by stable CtorId,
and language-level built-in constructors (Result.Ok /
Result.Err / Option.Some / Option.None) that don’t get
user-program ids because they’re not user-declared.
Wave 3c-i pin: built-in ctors travel through the same
MirConstruct / MirPattern::Ctor shape as user ctors, so
every consumer reading constructor identity goes through one
matchable enum — no separate “is this Result.Ok” string check
scattered across backends.
Variants§
User(CtorId)
User-declared sum-type variant or record constructor.
Builtin(BuiltinCtor)
Language-level built-in (Result.Ok / Result.Err /
Option.Some / Option.None). Same BuiltinCtor enum
the resolver pass uses, re-exported by super::*.
Trait Implementations§
impl Copy for MirCtor
impl Eq for MirCtor
impl StructuralPartialEq for MirCtor
Auto Trait Implementations§
impl Freeze for MirCtor
impl RefUnwindSafe for MirCtor
impl Send for MirCtor
impl Sync for MirCtor
impl Unpin for MirCtor
impl UnsafeUnpin for MirCtor
impl UnwindSafe for MirCtor
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.