pub trait ErrorContext {
// Required method
fn label_and_source_file(&self) -> (SourceSpan, Option<Arc<SourceFile>>);
}
Expand description
Trait defining the interface for error context providers.
This trait contains the same methods as ErrorContext
to provide a common
interface for error context functionality.
Required Methods§
Sourcefn label_and_source_file(&self) -> (SourceSpan, Option<Arc<SourceFile>>)
fn label_and_source_file(&self) -> (SourceSpan, Option<Arc<SourceFile>>)
Returns the label and source file associated with the error context, if any.
Note that SourceSpan::UNKNOWN
will be returned to indicate an empty span.