Struct rustc_errors::emitter::EmitterWriter [−][src]
pub struct EmitterWriter { dst: Destination, cm: Option<Lrc<CodeMapperDyn>>, short_message: bool, teach: bool, ui_testing: bool, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
dst: Destination
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
cm: Option<Lrc<CodeMapperDyn>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
short_message: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
teach: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
ui_testing: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl EmitterWriter
[src]
impl EmitterWriter
pub fn stderr(
color_config: ColorConfig,
code_map: Option<Lrc<CodeMapperDyn>>,
short_message: bool,
teach: bool
) -> EmitterWriter
[src]
pub fn stderr(
color_config: ColorConfig,
code_map: Option<Lrc<CodeMapperDyn>>,
short_message: bool,
teach: bool
) -> EmitterWriter
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn new(
dst: Box<Write + Send>,
code_map: Option<Lrc<CodeMapperDyn>>,
short_message: bool,
teach: bool
) -> EmitterWriter
[src]
pub fn new(
dst: Box<Write + Send>,
code_map: Option<Lrc<CodeMapperDyn>>,
short_message: bool,
teach: bool
) -> EmitterWriter
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn ui_testing(self, ui_testing: bool) -> Self
[src]
pub fn ui_testing(self, ui_testing: bool) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn maybe_anonymized(&self, line_num: usize) -> String
[src]
fn maybe_anonymized(&self, line_num: usize) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn preprocess_annotations(
&mut self,
msp: &MultiSpan
) -> Vec<FileWithAnnotatedLines>
[src]
fn preprocess_annotations(
&mut self,
msp: &MultiSpan
) -> Vec<FileWithAnnotatedLines>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn render_source_line(
&self,
buffer: &mut StyledBuffer,
file: Lrc<FileMap>,
line: &Line,
width_offset: usize,
code_offset: usize
) -> Vec<(usize, Style)>
[src]
fn render_source_line(
&self,
buffer: &mut StyledBuffer,
file: Lrc<FileMap>,
line: &Line,
width_offset: usize,
code_offset: usize
) -> Vec<(usize, Style)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_multispan_max_line_num(&mut self, msp: &MultiSpan) -> usize
[src]
fn get_multispan_max_line_num(&mut self, msp: &MultiSpan) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_max_line_num(
&mut self,
span: &MultiSpan,
children: &[SubDiagnostic]
) -> usize
[src]
fn get_max_line_num(
&mut self,
span: &MultiSpan,
children: &[SubDiagnostic]
) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fix_multispan_in_std_macros(
&mut self,
span: &mut MultiSpan,
always_backtrace: bool
) -> bool
[src]
fn fix_multispan_in_std_macros(
&mut self,
span: &mut MultiSpan,
always_backtrace: bool
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fix_multispans_in_std_macros(
&mut self,
span: &mut MultiSpan,
children: &mut Vec<SubDiagnostic>,
backtrace: bool
)
[src]
fn fix_multispans_in_std_macros(
&mut self,
span: &mut MultiSpan,
children: &mut Vec<SubDiagnostic>,
backtrace: bool
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn msg_to_buffer(
&self,
buffer: &mut StyledBuffer,
msg: &[(String, Style)],
padding: usize,
label: &str,
override_style: Option<Style>
)
[src]
fn msg_to_buffer(
&self,
buffer: &mut StyledBuffer,
msg: &[(String, Style)],
padding: usize,
label: &str,
override_style: Option<Style>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Add a left margin to every line but the first, given a padding length and the label being displayed, keeping the provided highlighting.
fn emit_message_default(
&mut self,
msp: &MultiSpan,
msg: &[(String, Style)],
code: &Option<DiagnosticId>,
level: &Level,
max_line_num_len: usize,
is_secondary: bool
) -> Result<()>
[src]
fn emit_message_default(
&mut self,
msp: &MultiSpan,
msg: &[(String, Style)],
code: &Option<DiagnosticId>,
level: &Level,
max_line_num_len: usize,
is_secondary: bool
) -> Result<()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn emit_suggestion_default(
&mut self,
suggestion: &CodeSuggestion,
level: &Level,
max_line_num_len: usize
) -> Result<()>
[src]
fn emit_suggestion_default(
&mut self,
suggestion: &CodeSuggestion,
level: &Level,
max_line_num_len: usize
) -> Result<()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn emit_messages_default(
&mut self,
level: &Level,
message: &[(String, Style)],
code: &Option<DiagnosticId>,
span: &MultiSpan,
children: &[SubDiagnostic],
suggestions: &[CodeSuggestion]
)
[src]
fn emit_messages_default(
&mut self,
level: &Level,
message: &[(String, Style)],
code: &Option<DiagnosticId>,
span: &MultiSpan,
children: &[SubDiagnostic],
suggestions: &[CodeSuggestion]
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl Emitter for EmitterWriter
[src]
impl Emitter for EmitterWriter
fn emit(&mut self, db: &DiagnosticBuilder)
[src]
fn emit(&mut self, db: &DiagnosticBuilder)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Emit a structured diagnostic.
fn should_show_explain(&self) -> bool
[src]
fn should_show_explain(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Check if should show explanations about "rustc --explain"
Auto Trait Implementations
impl !Send for EmitterWriter
impl !Send for EmitterWriter
impl !Sync for EmitterWriter
impl !Sync for EmitterWriter