pub enum LangSpecError {
Source(SourceError),
Lex(LexerError),
Parse {
code: CompilerErrorCode,
message: String,
},
}Expand description
Errors returned while bootstrapping the builtin language spec.
Variants§
Source(SourceError)
Source loading failure.
Lex(LexerError)
Lexing failure.
Parse
The language specification text was malformed.
Fields
§
code: CompilerErrorCodeUpstream-aligned compiler error code.
Trait Implementations§
Source§impl Debug for LangSpecError
impl Debug for LangSpecError
Source§impl Display for LangSpecError
impl Display for LangSpecError
Source§impl Error for LangSpecError
impl Error for LangSpecError
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<LangSpecError> for CompilerSessionError
impl From<LangSpecError> for CompilerSessionError
Source§fn from(value: LangSpecError) -> Self
fn from(value: LangSpecError) -> Self
Converts to this type from the input type.
Source§impl From<LexerError> for LangSpecError
impl From<LexerError> for LangSpecError
Source§fn from(value: LexerError) -> Self
fn from(value: LexerError) -> Self
Converts to this type from the input type.
Source§impl From<SourceError> for LangSpecError
impl From<SourceError> for LangSpecError
Source§fn from(value: SourceError) -> Self
fn from(value: SourceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LangSpecError
impl RefUnwindSafe for LangSpecError
impl Send for LangSpecError
impl Sync for LangSpecError
impl Unpin for LangSpecError
impl UnsafeUnpin for LangSpecError
impl UnwindSafe for LangSpecError
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