pub(crate) enum EvaluationFailure {
SymbolDefinitionLoop {
span: SimpleSpan,
deps_in_order: OneOrMore<SymbolName>,
},
BlockTooLarge(SimpleSpan, MachineLimitExceededFailure),
FailedToAssignIndexRegister(ExhaustedIndexRegisters),
HereIsNotAllowedHere(SimpleSpan),
}
Expand description
We failed while evaluating the value of a word (typically, the value of a word in the final assembled output).
Variants§
SymbolDefinitionLoop
Evaluation failed because there was a loop in the definition of a symbol (i.e. in one of the equaities we needed to evaluate to determine the final result).
BlockTooLarge(SimpleSpan, MachineLimitExceededFailure)
A block of the program is too large.
FailedToAssignIndexRegister(ExhaustedIndexRegisters)
More index values needed to be default-assigned than there are index registers in the TX-2 architecture.
HereIsNotAllowedHere(SimpleSpan)
We could not evaluate something because #
was used in a
context in which it was not allowed (an origin value).
Implementations§
Source§impl EvaluationFailure
impl EvaluationFailure
Sourcepub(crate) fn into_program_error(self) -> ProgramError
pub(crate) fn into_program_error(self) -> ProgramError
Convert an instance of EvaluationFailure
(which describes
why an evaluation failed) into an instance of ProgramError
(which describes why the user’s program cannot be assembled).
Trait Implementations§
Source§impl Debug for EvaluationFailure
impl Debug for EvaluationFailure
Source§impl Display for EvaluationFailure
impl Display for EvaluationFailure
Source§impl Error for EvaluationFailure
impl Error for EvaluationFailure
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for EvaluationFailure
impl PartialEq for EvaluationFailure
impl Eq for EvaluationFailure
impl StructuralPartialEq for EvaluationFailure
Auto Trait Implementations§
impl Freeze for EvaluationFailure
impl RefUnwindSafe for EvaluationFailure
impl Send for EvaluationFailure
impl Sync for EvaluationFailure
impl Unpin for EvaluationFailure
impl UnwindSafe for EvaluationFailure
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
§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.