Skip to content

Commit 59cc5e5

Browse files
committed
errors: add emit_note/create_note on Handler
Support for emission of notes was added in f8ebc72 but `emit_note` and `create_note` functions weren't added to `Handler`. Signed-off-by: David Wood <[email protected]>
1 parent 3f25e56 commit 59cc5e5

File tree

1 file changed

+11
-0
lines changed
  • compiler/rustc_errors/src

1 file changed

+11
-0
lines changed

compiler/rustc_errors/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,17 @@ impl Handler {
11571157
self.create_bug(bug).emit()
11581158
}
11591159

1160+
pub fn emit_note<'a>(&'a self, note: impl IntoDiagnostic<'a, Noted>) -> Noted {
1161+
self.create_note(note).emit()
1162+
}
1163+
1164+
pub fn create_note<'a>(
1165+
&'a self,
1166+
note: impl IntoDiagnostic<'a, Noted>,
1167+
) -> DiagnosticBuilder<'a, Noted> {
1168+
note.into_diagnostic(self)
1169+
}
1170+
11601171
fn emit_diag_at_span(
11611172
&self,
11621173
mut diag: Diagnostic,

0 commit comments

Comments
 (0)