pub enum LiteralError {
NotALiteral,
Empty,
TooLong,
NoHexDigits,
IncompleteUcn,
InvalidUcn,
NamedUcn,
InvalidUtf8,
PrefixNotInDialect,
}Expand description
Why a spelling is not a literal.
Variants§
NotALiteral
The spelling is not a character constant or a string literal at all, which the caller cannot reach from a token the scanner produced.
Empty
'', which has no character in it to have a value.
TooLong
More characters than the type has room for, in the one encoding where that is an error rather than a warning.
NoHexDigits
\x with no hexadecimal digit after it.
IncompleteUcn
A universal character name that stops before its digits are done.
InvalidUcn
A universal character name that may not name what it names: a character in the basic character set, a surrogate, or a code point past the end of Unicode.
NamedUcn
\N{NAME}, which gcc 13.3 has in C++23 and in no C dialect.
InvalidUtf8
A byte in the source that is not part of a character, in a literal whose encoding has to know what the characters are.
PrefixNotInDialect
An encoding prefix the dialect does not have.
Implementations§
Trait Implementations§
Source§impl Clone for LiteralError
impl Clone for LiteralError
Source§fn clone(&self) -> LiteralError
fn clone(&self) -> LiteralError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more