Struct clippy::utils::DiagnosticWrapper
[−]
[src]
pub struct DiagnosticWrapper<'a>(pub DiagnosticBuilder<'a>);
Methods from Deref<Target=DiagnosticBuilder<'a>>
fn emit(&mut self)
Unstable (
rustc_private
)Emit the diagnostic.
fn cancel(&mut self)
Unstable (
rustc_private
)Cancel the diagnostic (a structured diagnostic must either be emitted or
cancelled or it will panic when dropped).
BEWARE: if this DiagnosticBuilder is an error, then creating it will
bump the error count on the Handler and cancelling it won't undo that.
If you want to decrement the error count you should use Handler::cancel
.
fn cancelled(&self) -> bool
Unstable (
rustc_private
)fn is_fatal(&self) -> bool
Unstable (
rustc_private
)fn note(&mut self, msg: &str) -> &mut DiagnosticBuilder<'a>
Unstable (
rustc_private
)fn span_note<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn warn(&mut self, msg: &str) -> &mut DiagnosticBuilder<'a>
Unstable (
rustc_private
)fn span_warn<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn help(&mut self, msg: &str) -> &mut DiagnosticBuilder<'a>
Unstable (
rustc_private
)fn span_help<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn span_suggestion<S>(&mut self, sp: S, msg: &str, suggestion: String) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)Prints out a message with a suggested edit of the code.
See diagnostic::RenderSpan::Suggestion
for more information.
fn span_end_note<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn fileline_warn<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn fileline_note<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn fileline_help<S>(&mut self, sp: S, msg: &str) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn span<S>(&mut self, sp: S) -> &mut DiagnosticBuilder<'a> where S: Into<MultiSpan>
Unstable (
rustc_private
)fn code(&mut self, s: String) -> &mut DiagnosticBuilder<'a>
Unstable (
rustc_private
)