diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-05-05 21:49:59 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-05-06 00:55:42 -0700 |
| commit | 8c9ad8d72c5a3ad73af33e3ad9a409327645ac28 (patch) | |
| tree | 52c51d380feab94de6d8e7300d1b02a0c67c0885 /src/librustc_errors | |
| parent | 56411443f2421e6726413c212a697a45d45ddfa1 (diff) | |
Group "macro expansion" notes per call span
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 06aafa05052..db8c9ac306b 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -388,11 +388,13 @@ impl Handler { pub fn span_note_without_error<S: Into<MultiSpan>>(&self, sp: S, msg: &str) { self.emit(&sp.into(), msg, Note); } - pub fn span_label_without_error(&self, sp: Span, msg: &str, lbl: &str) { + pub fn span_note_diag<'a>(&'a self, + sp: Span, + msg: &str) + -> DiagnosticBuilder<'a> { let mut db = DiagnosticBuilder::new(self, Note, msg); db.set_span(sp); - db.span_label(sp, &lbl); - db.emit(); + db } pub fn span_unimpl<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! { self.span_bug(sp, &format!("unimplemented {}", msg)); |
