Struct syntax::diagnostic::SpanHandler [−] [src]

pub struct SpanHandler {
    pub handler: Handler,
    pub cm: CodeMap,
}
Unstable

A span-handler is like a handler but also accepts span information for source-location reporting.

Fields

handler
Unstable
cm
Unstable

Methods

impl SpanHandler

fn span_fatal(&self, sp: Span, msg: &str) -> FatalError

Unstable

fn span_fatal_with_code(&self, sp: Span, msg: &str, code: &str) -> FatalError

Unstable

fn span_err(&self, sp: Span, msg: &str)

Unstable

fn span_err_with_code(&self, sp: Span, msg: &str, code: &str)

Unstable

fn span_warn(&self, sp: Span, msg: &str)

Unstable

fn span_warn_with_code(&self, sp: Span, msg: &str, code: &str)

Unstable

fn span_note(&self, sp: Span, msg: &str)

Unstable

fn span_end_note(&self, sp: Span, msg: &str)

Unstable

fn span_help(&self, sp: Span, msg: &str)

Unstable

fn span_suggestion(&self, sp: Span, msg: &str, suggestion: String)

Unstable

Prints out a message with a suggested edit of the code.

See diagnostic::RenderSpan::Suggestion for more information.

fn fileline_note(&self, sp: Span, msg: &str)

Unstable

fn fileline_help(&self, sp: Span, msg: &str)

Unstable

fn span_bug(&self, sp: Span, msg: &str) -> !

Unstable

fn span_unimpl(&self, sp: Span, msg: &str) -> !

Unstable

fn handler<'a>(&'a self) -> &'a Handler

Unstable