diff options
Diffstat (limited to 'src/librustc_errors/lib.rs')
| -rw-r--r-- | src/librustc_errors/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index e4a560e434a..7261c638ce0 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -581,6 +581,11 @@ impl Handler { DiagnosticBuilder::new(self, Level::Help, msg) } + /// Construct a builder at the `Note` level with the `msg`. + pub fn struct_note_without_error(&self, msg: &str) -> DiagnosticBuilder<'_> { + DiagnosticBuilder::new(self, Level::Note, msg) + } + pub fn span_fatal(&self, span: impl Into<MultiSpan>, msg: &str) -> FatalError { self.emit_diag_at_span(Diagnostic::new(Fatal, msg), span); FatalError |
