about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-09 03:36:12 +0000
committerbors <bors@rust-lang.org>2017-05-09 03:36:12 +0000
commitbedd7da3d28d69520f33ac6a585df87ef1373a26 (patch)
tree78b0129c76c87b9ef98d7b7f83a77083a073720a /src/librustc_errors
parentf1140a33176a5fb2e91e26ea3ae42a834dd9bfdf (diff)
parentf21209f442ef29f2d77464d2ba37dcec154fbfe2 (diff)
downloadrust-bedd7da3d28d69520f33ac6a585df87ef1373a26.tar.gz
rust-bedd7da3d28d69520f33ac6a585df87ef1373a26.zip
Auto merge of #41846 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests

- Successful merges: #41293, #41520, #41827, #41828, #41833, #41836, #41838, #41842
- Failed merges:
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 02d8297dd46..db8c9ac306b 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -388,6 +388,14 @@ 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_note_diag<'a>(&'a self,
+                              sp: Span,
+                              msg: &str)
+                              -> DiagnosticBuilder<'a> {
+        let mut db = DiagnosticBuilder::new(self, Note, msg);
+        db.set_span(sp);
+        db
+    }
     pub fn span_unimpl<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
         self.span_bug(sp, &format!("unimplemented {}", msg));
     }