pub enum TextLexicalCause {
BlockCommentNotTerminated,
InvalidIdentifier,
UnknownPrefix,
UnknownLifetimePrefix,
GuardedStringPrefix,
MalformedLiteral,
LifetimeStartsWithNumber,
Frontmatter,
UnknownToken,
}Expand description
Why the low-level lexer could not normalize one spelling.
Variants§
BlockCommentNotTerminated
A block comment was not terminated.
InvalidIdentifier
An identifier contains a character the compiler lexer rejects.
UnknownPrefix
A prefix is reserved or not meaningful without an edition-aware parser.
UnknownLifetimePrefix
A lifetime prefix is reserved or not meaningful without an edition-aware parser.
GuardedStringPrefix
A guarded-string prefix requires parser context this boundary does not own.
MalformedLiteral
A literal carries a malformed low-level spelling.
LifetimeStartsWithNumber
A lifetime begins with a number.
Frontmatter
Frontmatter is not Rust token input at this boundary.
UnknownToken
The lexer reported a character with no lawful Rust token kind.
Implementations§
Trait Implementations§
Source§impl Clone for TextLexicalCause
impl Clone for TextLexicalCause
Source§fn clone(&self) -> TextLexicalCause
fn clone(&self) -> TextLexicalCause
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextLexicalCause
Source§impl Debug for TextLexicalCause
impl Debug for TextLexicalCause
Source§impl Display for TextLexicalCause
impl Display for TextLexicalCause
impl Eq for TextLexicalCause
Source§impl Error for TextLexicalCause
impl Error for TextLexicalCause
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 Hash for TextLexicalCause
impl Hash for TextLexicalCause
Source§impl PartialEq for TextLexicalCause
impl PartialEq for TextLexicalCause
impl StructuralPartialEq for TextLexicalCause
Auto Trait Implementations§
impl Freeze for TextLexicalCause
impl RefUnwindSafe for TextLexicalCause
impl Send for TextLexicalCause
impl Sync for TextLexicalCause
impl Unpin for TextLexicalCause
impl UnsafeUnpin for TextLexicalCause
impl UnwindSafe for TextLexicalCause
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