#[non_exhaustive]pub enum EvalError {
Unresolved {
at: NodeId,
},
DanglingExpr,
DivisionByZero {
at: NodeId,
},
Overflow {
at: NodeId,
},
InvalidShift {
at: NodeId,
},
NotIntegral {
at: NodeId,
},
TooDeep,
MixedOperands {
at: NodeId,
},
NotFloatingOperator {
at: NodeId,
},
NotFixedOperator {
at: NodeId,
},
LongDouble {
at: NodeId,
},
}Expand description
Why an expression could not be evaluated.
Evaluation of a partially discovered model fails loudly; it never substitutes a default. Spec §3.5.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unresolved
The tree reached a reference that is not resolved.
DanglingExpr
A handle in the tree did not address a live expression node.
DivisionByZero
Division or remainder by zero.
Overflow
The computation left the range of i128.
InvalidShift
A shift distance was negative or wider than the value.
NotIntegral
The literal is not integral, so integral evaluation cannot apply.
TooDeep
The expression nests deeper than evaluation will follow. Bounds the work a hostile snapshot can demand.
MixedOperands
An infix operator combines a floating-point operand with one that is not. IDL 4.2 §7.4.1.4.2: “An infix operator may combine two integer types, floating point types or fixed point types, but not mixtures of these.”
NotFloatingOperator
An operator other than unary + - and binary * / + - over
floating-point operands. IDL 4.2 §7.4.1.4.2 admits only those.
NotFixedOperator
An operator other than unary + - and binary * / + - over
fixed-point operands. IDL 4.2 §7.4.1.4.2 admits only those.
LongDouble
The arithmetic would have to run in long double: the constant
is one, an operand is one, or a literal is too large for double
and so is one (IDL 4.2 §7.4.1.4.2). This build has no IEEE
double-extended or binary128 arithmetic to run it in, and doing it
in double instead would round where the clause says not to.
Trait Implementations§
impl Eq for EvalError
Source§impl Error for EvalError
impl Error for EvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()