pub enum Error {
NonExhaustiveMatch {
value: Name,
tpe: Name,
missing: Vec<Name>,
},
}Expand description
A case expression whose branches do not cover every variant of the type it
scrutinises.
Nothing constructs this yet — check is a stub. It is defined now so that the
phase has a renderable error before it has a checker, the same way
canonical::Error::InvalidTupleSize is kept for a rejection path that does not
exist yet. Writing the checker means constructing this, not inventing an error
type and a diagnostic at the same time.
Variants§
NonExhaustiveMatch
Trait Implementations§
Source§impl PhaseError for Error
impl PhaseError for Error
Source§fn message(&self) -> String
fn message(&self) -> String
One line naming what went wrong, in the vocabulary of the user’s source. Read more
Source§fn notes(&self) -> Vec<String>
fn notes(&self) -> Vec<String>
Supporting detail, one string per rendered note. Empty by default.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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