Enum rustc_parse::errors::UnescapeError
source · pub enum UnescapeError {
Show 19 variants
InvalidUnicodeEscape {
span: Span,
surrogate: bool,
},
EscapeOnlyChar {
span: Span,
char_span: Span,
escaped_sugg: String,
escaped_msg: String,
byte: bool,
},
BareCr {
span: Span,
double_quotes: bool,
},
BareCrRawString(Span),
TooShortHexEscape(Span),
InvalidCharInEscape {
span: Span,
is_hex: bool,
ch: String,
},
OutOfRangeHexEscape(Span),
LeadingUnderscoreUnicodeEscape {
span: Span,
ch: String,
},
OverlongUnicodeEscape(Span),
UnclosedUnicodeEscape(Span, Span),
NoBraceInUnicodeEscape {
span: Span,
label: Option<Span>,
sub: NoBraceUnicodeSub,
},
UnicodeEscapeInByte(Span),
EmptyUnicodeEscape(Span),
ZeroChars(Span),
LoneSlash(Span),
UnskippedWhitespace {
span: Span,
char_span: Span,
ch: String,
},
MultipleSkippedLinesWarning(Span),
MoreThanOneChar {
span: Span,
note: Option<MoreThanOneCharNote>,
suggestion: MoreThanOneCharSugg,
},
NulInCStr {
span: Span,
},
}
Variants§
InvalidUnicodeEscape
EscapeOnlyChar
BareCr
BareCrRawString(Span)
TooShortHexEscape(Span)
InvalidCharInEscape
OutOfRangeHexEscape(Span)
LeadingUnderscoreUnicodeEscape
OverlongUnicodeEscape(Span)
UnclosedUnicodeEscape(Span, Span)
NoBraceInUnicodeEscape
UnicodeEscapeInByte(Span)
EmptyUnicodeEscape(Span)
ZeroChars(Span)
LoneSlash(Span)
UnskippedWhitespace
MultipleSkippedLinesWarning(Span)
MoreThanOneChar
NulInCStr
Trait Implementations§
source§impl<'_sess, G> Diagnostic<'_sess, G> for UnescapeErrorwhere
G: EmissionGuarantee,
impl<'_sess, G> Diagnostic<'_sess, G> for UnescapeErrorwhere
G: EmissionGuarantee,
Auto Trait Implementations§
impl DynSend for UnescapeError
impl DynSync for UnescapeError
impl Freeze for UnescapeError
impl RefUnwindSafe for UnescapeError
impl Send for UnescapeError
impl Sync for UnescapeError
impl Unpin for UnescapeError
impl UnwindSafe for UnescapeError
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Filterable for T
impl<T> Filterable for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes
Size for each variant:
InvalidUnicodeEscape
: 12 bytesEscapeOnlyChar
: 104 bytesBareCr
: 12 bytesBareCrRawString
: 8 bytesTooShortHexEscape
: 8 bytesInvalidCharInEscape
: 72 bytesOutOfRangeHexEscape
: 8 bytesLeadingUnderscoreUnicodeEscape
: 64 bytesOverlongUnicodeEscape
: 8 bytesUnclosedUnicodeEscape
: 16 bytesNoBraceInUnicodeEscape
: 88 bytesUnicodeEscapeInByte
: 8 bytesEmptyUnicodeEscape
: 8 bytesZeroChars
: 8 bytesLoneSlash
: 8 bytesUnskippedWhitespace
: 72 bytesMultipleSkippedLinesWarning
: 8 bytesMoreThanOneChar
: 136 bytesNulInCStr
: 8 bytes