pub trait HasSourceSpan {
// Required methods
fn source_span(&self) -> Option<&Span>;
fn set_source_span(&mut self, span: Span);
fn unset_source_span(&mut self);
// Provided methods
fn with_source_span(self, ts_span: Span) -> Self
where Self: Sized { ... }
fn has_source_span(&self) -> bool { ... }
}
Expand description
This trait is implemented by types that include a source location from which they were parsed.