Skip to content

Commit fe29317

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 18890f0 commit fe29317

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
@@ -1156,6 +1156,17 @@ impl Handler {
11561156
self.create_bug(bug).emit()
11571157
}
11581158

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

0 commit comments

Comments
 (0)