[][src]Trait rustc_errors::emitter::Emitter

pub trait Emitter {
    fn emit_diagnostic(&mut self, db: &DiagnosticBuilder);

    fn maybe_emit_json_directive(&mut self, _directive: String) { ... }
fn should_show_explain(&self) -> bool { ... } }

Emitter trait for emitting errors.

Required methods

fn emit_diagnostic(&mut self, db: &DiagnosticBuilder)

Emit a structured diagnostic.

Loading content...

Provided methods

fn maybe_emit_json_directive(&mut self, _directive: String)

Emit a JSON directive. The default is to do nothing; this should only be emitted with --error-format=json.

fn should_show_explain(&self) -> bool

Checks if should show explanations about "rustc --explain"

Loading content...

Implementors

impl Emitter for EmitterWriter[src]

Loading content...