Struct syntax::diagnostic::HandlerUnstable [-] [+] [src]

pub struct Handler {
    pub can_emit_warnings: bool,
    // some fields omitted
}

A handler deals with errors; certain errors (fatal, bug, unimpl) may cause immediate exit, others log errors for later reporting.

Fields

can_emit_warnings

Methods

impl Handler

fn fatal(&self, msg: &str) -> !

fn err(&self, msg: &str)

fn bump_err_count(&self)

fn err_count(&self) -> usize

fn has_errors(&self) -> bool

fn abort_if_errors(&self)

fn warn(&self, msg: &str)

fn note(&self, msg: &str)

fn help(&self, msg: &str)

fn bug(&self, msg: &str) -> !

fn unimpl(&self, msg: &str) -> !

fn emit(&self, cmsp: Option<(&CodeMap, Span)>, msg: &str, lvl: Level)

fn emit_with_code(&self, cmsp: Option<(&CodeMap, Span)>, msg: &str, code: &str, lvl: Level)

fn custom_emit(&self, cm: &CodeMap, sp: RenderSpan, msg: &str, lvl: Level)