Struct syntex_syntax::diagnostics::metadata::ErrorLocation [] [src]

pub struct ErrorLocation {
    pub filename: String,
    pub line: usize,
}

JSON encodable error location type with filename and line number.

Fields

filename
line

Methods

impl ErrorLocation

fn from_span(ecx: &ExtCtxt, sp: Span) -> ErrorLocation

Create an error location from a span.

Trait Implementations

Derived Implementations

impl Encodable for ErrorLocation

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for ErrorLocation

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<ErrorLocation, __D::Error>

impl PartialEq for ErrorLocation

fn eq(&self, __arg_0: &ErrorLocation) -> bool

fn ne(&self, __arg_0: &ErrorLocation) -> bool