pub enum CompileErrorKind {
Show 16 variants
ConstantPoolOverflow {
max: usize,
attempted: usize,
},
UnsupportedOperator {
operator: String,
context: String,
},
UnsupportedExpr {
expr_type: String,
},
InvalidOpcode {
opcode: u8,
position: usize,
},
UndefinedVariable {
name: String,
},
SymbolsTableOverflow {
max: usize,
name: String,
},
LocalsOverflow {
max: usize,
name: String,
},
ScopeUnderflow,
BreakOutsideLoop,
ContinueOutsideLoop,
UndeclaredLabel {
label: String,
},
ImmutableAssignment {
name: String,
},
UnknownMacro {
name: String,
},
FormatArgCountMismatch {
placeholders: usize,
arguments: usize,
},
MacroExpectsFormatString {
macro_name: String,
},
VariantTagOverflow {
name: String,
count: usize,
max: usize,
},
}Expand description
The underlying variant of a compile-time error.
Variants§
ConstantPoolOverflow
UnsupportedOperator
UnsupportedExpr
InvalidOpcode
UndefinedVariable
SymbolsTableOverflow
LocalsOverflow
ScopeUnderflow
BreakOutsideLoop
ContinueOutsideLoop
UndeclaredLabel
ImmutableAssignment
UnknownMacro
FormatArgCountMismatch
MacroExpectsFormatString
VariantTagOverflow
Implementations§
Source§impl CompileErrorKind
impl CompileErrorKind
Sourcepub fn at(self, span: Span) -> CompileError
pub fn at(self, span: Span) -> CompileError
Attaches a source span to this error kind, producing a CompileError.
Trait Implementations§
Source§impl Debug for CompileErrorKind
impl Debug for CompileErrorKind
Source§impl Display for CompileErrorKind
impl Display for CompileErrorKind
Source§impl Error for CompileErrorKind
impl Error for CompileErrorKind
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 From<CompileErrorKind> for CompileError
impl From<CompileErrorKind> for CompileError
Source§fn from(kind: CompileErrorKind) -> Self
fn from(kind: CompileErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CompileErrorKind
impl RefUnwindSafe for CompileErrorKind
impl Send for CompileErrorKind
impl Sync for CompileErrorKind
impl Unpin for CompileErrorKind
impl UnsafeUnpin for CompileErrorKind
impl UnwindSafe for CompileErrorKind
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