pub struct ConstEvalError(/* private fields */);
Expand description
Error indicating constant evaluation failed.
This error emitted when
- an expression can’t be evaluated in compilation time
- arithmetic overflow occurred during evaluation
- zero division is detected during evaluation
Can’t be created unless a diagnostic has been emitted, and thus a DiagnosticVoucher
has been obtained. (See comment on TypeError
)
NOTE: Clone
is required because these are stored in a salsa db.
Please don’t clone these manually.
Implementations§
Source§impl ConstEvalError
impl ConstEvalError
pub fn new(voucher: DiagnosticVoucher) -> Self
Trait Implementations§
Source§impl Clone for ConstEvalError
impl Clone for ConstEvalError
Source§fn clone(&self) -> ConstEvalError
fn clone(&self) -> ConstEvalError
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 ConstEvalError
impl Debug for ConstEvalError
Source§impl From<ConstEvalError> for FatalError
impl From<ConstEvalError> for FatalError
Source§fn from(err: ConstEvalError) -> Self
fn from(err: ConstEvalError) -> Self
Converts to this type from the input type.
Source§impl From<ConstEvalError> for TypeError
impl From<ConstEvalError> for TypeError
Source§fn from(err: ConstEvalError) -> Self
fn from(err: ConstEvalError) -> Self
Converts to this type from the input type.
Source§impl From<FatalError> for ConstEvalError
impl From<FatalError> for ConstEvalError
Source§fn from(err: FatalError) -> Self
fn from(err: FatalError) -> Self
Converts to this type from the input type.
Source§impl From<IncompleteItem> for ConstEvalError
impl From<IncompleteItem> for ConstEvalError
Source§fn from(err: IncompleteItem) -> Self
fn from(err: IncompleteItem) -> Self
Converts to this type from the input type.
Source§impl From<TypeError> for ConstEvalError
impl From<TypeError> for ConstEvalError
Source§impl Hash for ConstEvalError
impl Hash for ConstEvalError
Source§impl PartialEq for ConstEvalError
impl PartialEq for ConstEvalError
impl Eq for ConstEvalError
impl StructuralPartialEq for ConstEvalError
Auto Trait Implementations§
impl Freeze for ConstEvalError
impl RefUnwindSafe for ConstEvalError
impl Send for ConstEvalError
impl Sync for ConstEvalError
impl Unpin for ConstEvalError
impl UnwindSafe for ConstEvalError
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.