pub enum AsmError {
UnknownMnemonic {
mnemonic: String,
arch: ArchName,
span: Span,
},
InvalidOperands {
detail: String,
span: Span,
},
ImmediateOverflow {
value: i128,
min: i128,
max: i128,
span: Span,
},
UndefinedLabel {
label: String,
span: Span,
},
DuplicateLabel {
label: String,
span: Span,
first_span: Span,
},
BranchOutOfRange {
label: String,
disp: i64,
max: i64,
span: Span,
},
Syntax {
msg: String,
span: Span,
},
RelaxationLimit {
max: usize,
},
ResourceLimitExceeded {
resource: String,
limit: usize,
},
Multiple {
errors: Vec<AsmError>,
},
}Expand description
Assembly error with source location and descriptive message.
Variants§
UnknownMnemonic
Unknown mnemonic for the target architecture.
Fields
InvalidOperands
Invalid operand combination for the instruction.
Fields
ImmediateOverflow
Immediate value exceeds the allowed range.
Fields
UndefinedLabel
Referenced label was never defined.
DuplicateLabel
Label was defined more than once.
Fields
BranchOutOfRange
Branch target is out of range even after relaxation.
Fields
Syntax
Syntax error during lexing or parsing.
RelaxationLimit
Branch relaxation did not converge within the allowed number of passes.
ResourceLimitExceeded
A configurable resource limit was exceeded (defense against DoS).
Fields
Multiple
Multiple errors collected during assembly.
Trait Implementations§
Source§impl Error for AsmError
Available on crate feature std only.
impl Error for AsmError
Available on crate feature
std only.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()
impl Eq for AsmError
impl StructuralPartialEq for AsmError
Auto Trait Implementations§
impl Freeze for AsmError
impl RefUnwindSafe for AsmError
impl Send for AsmError
impl Sync for AsmError
impl Unpin for AsmError
impl UnwindSafe for AsmError
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