[][src]Enum rustc_ap_rustc_lexer::LexRawStrError

pub enum LexRawStrError {
    InvalidStarter,
    NoTerminator {
        expected: usize,
        found: usize,
        possible_terminator_offset: Option<usize>,
    },
    TooManyDelimiters,
}

Error produced validating a raw string. Represents cases like:

  • r##~"abcde"##: LexRawStrError::InvalidStarter
  • r###"abcde"##: LexRawStrError::NoTerminator { expected: 3, found: 2, possible_terminator_offset: Some(11)
  • Too many #s (>65536): TooManyDelimiters

Variants

InvalidStarter

Non # characters exist between r and " eg. r#~"..

NoTerminator

The string was never terminated. possible_terminator_offset is the number of characters after r or br where they may have intended to terminate it.

Fields of NoTerminator

expected: usizefound: usizepossible_terminator_offset: Option<usize>
TooManyDelimiters

More than 65536 #s exist.

Trait Implementations

impl Clone for LexRawStrError[src]

impl Copy for LexRawStrError[src]

impl Debug for LexRawStrError[src]

impl Eq for LexRawStrError[src]

impl Ord for LexRawStrError[src]

impl PartialEq<LexRawStrError> for LexRawStrError[src]

impl PartialOrd<LexRawStrError> for LexRawStrError[src]

impl StructuralEq for LexRawStrError[src]

impl StructuralPartialEq for LexRawStrError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.