Enum ra_ap_hir::MirEvalError
source · pub enum MirEvalError {
Show 16 variants
ConstEvalError(String, Box<ConstEvalError>),
LayoutError(LayoutError, Ty<Interner>),
TargetDataLayoutNotAvailable(Arc<str>),
UndefinedBehavior(String),
Panic(String),
MirLowerError(FunctionId, MirLowerError),
MirLowerErrorForClosure(ClosureId<Interner>, MirLowerError),
TypeIsUnsized(Ty<Interner>, &'static str),
NotSupported(String),
InvalidConst(Const<Interner>),
InFunction(Box<MirEvalError>, Vec<(Either<FunctionId, ClosureId<Interner>>, MirSpan, DefWithBodyId)>),
ExecutionLimitExceeded,
StackOverflow,
InvalidVTableId(usize),
CoerceUnsizedError(Ty<Interner>),
InternalError(Box<str>),
}
Variants§
ConstEvalError(String, Box<ConstEvalError>)
LayoutError(LayoutError, Ty<Interner>)
TargetDataLayoutNotAvailable(Arc<str>)
UndefinedBehavior(String)
Means that code had undefined behavior. We don’t try to actively detect UB, but if it was detected then use this type of error.
Panic(String)
MirLowerError(FunctionId, MirLowerError)
MirLowerErrorForClosure(ClosureId<Interner>, MirLowerError)
TypeIsUnsized(Ty<Interner>, &'static str)
NotSupported(String)
InvalidConst(Const<Interner>)
InFunction(Box<MirEvalError>, Vec<(Either<FunctionId, ClosureId<Interner>>, MirSpan, DefWithBodyId)>)
ExecutionLimitExceeded
StackOverflow
InvalidVTableId(usize)
FIXME: Fold this into InternalError
CoerceUnsizedError(Ty<Interner>)
?
InternalError(Box<str>)
These should not occur, usually indicates a bug in mir lowering.
Implementations§
source§impl MirEvalError
impl MirEvalError
Trait Implementations§
source§impl Clone for MirEvalError
impl Clone for MirEvalError
source§fn clone(&self) -> MirEvalError
fn clone(&self) -> MirEvalError
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 Debug for MirEvalError
impl Debug for MirEvalError
source§impl From<MirEvalError> for ConstEvalError
impl From<MirEvalError> for ConstEvalError
source§fn from(value: MirEvalError) -> ConstEvalError
fn from(value: MirEvalError) -> ConstEvalError
Converts to this type from the input type.
source§impl PartialEq for MirEvalError
impl PartialEq for MirEvalError
source§fn eq(&self, other: &MirEvalError) -> bool
fn eq(&self, other: &MirEvalError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MirEvalError
impl StructuralPartialEq for MirEvalError
Auto Trait Implementations§
impl Freeze for MirEvalError
impl RefUnwindSafe for MirEvalError
impl Send for MirEvalError
impl Sync for MirEvalError
impl Unpin for MirEvalError
impl UnwindSafe for MirEvalError
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> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.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.