pub enum CoalesceShape {
PreserveOption,
Collapse,
RuntimeCheck,
}Expand description
Which of infer::ty::coalesce’s three outcomes one or step took —
the shape question LIR lowering asks, answered from types instead of
syntax.
Variants§
PreserveOption
Option[T] or Option[U] — optionality survives the step, so the
step’s value stays an Option for whatever consumes it (the next
step of a chain, or the expression’s own consumer).
Collapse
Option[T] or U — the step collapses to the plain value type.
RuntimeCheck
The left-hand type is not statically pinned (Ty::Unknown /
Ty::Conflicted — gradual mode, or a strict escape already reported
by E065/E066).
The runtime check is the semantics here (RULED 2026-07-26, and
documented on brink_format::Opcode::CoalesceSome): an Option value
coalesces, a plain value faults, exactly like every other gradual
runtime check. A consumer must not statically commit to either
shape on this verdict.
Trait Implementations§
Source§impl Clone for CoalesceShape
impl Clone for CoalesceShape
Source§fn clone(&self) -> CoalesceShape
fn clone(&self) -> CoalesceShape
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CoalesceShape
Source§impl Debug for CoalesceShape
impl Debug for CoalesceShape
impl Eq for CoalesceShape
Source§impl PartialEq for CoalesceShape
impl PartialEq for CoalesceShape
impl StructuralPartialEq for CoalesceShape
Auto Trait Implementations§
impl Freeze for CoalesceShape
impl RefUnwindSafe for CoalesceShape
impl Send for CoalesceShape
impl Sync for CoalesceShape
impl Unpin for CoalesceShape
impl UnsafeUnpin for CoalesceShape
impl UnwindSafe for CoalesceShape
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
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§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
key and return true if they are equal.