Struct syntax::codemap::SpanExperimental [-]  [+] [src]

pub struct Span {
    pub lo: BytePos,
    pub hi: BytePos,
    pub expn_id: ExpnId,
}

Spans represent a region of code, used for error reporting. Positions in spans are absolute positions from the beginning of the codemap, not positions relative to FileMaps. Methods on the CodeMap can be used to relate spans back to the original source.

Fields

lo
hi
expn_id

Information about where the macro came from, if this piece of code was created by a macro expansion.

Trait Implementations

impl PartialEq for Span

fn eq(&self, other: &Span) -> bool

fn ne(&self, other: &Span) -> bool

impl Eq for Span

fn assert_receiver_is_total_eq(&self)

impl<S: Encoder<E>, E> Encodable<S, E> for Span

fn encode(&self, s: &mut S) -> Result<(), E>

impl<D: Decoder<E>, E> Decodable<D, E> for Span

fn decode(_d: &mut D) -> Result<Span, E>

Derived Implementations

impl<__S: Writer> Hash<__S> for Span

fn hash(&self, __arg_0: &mut __S)

impl Show for Span

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for Span

impl Clone for Span

fn clone(&self) -> Span

fn clone_from(&mut self, source: &Self)