about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-14 07:08:50 +0000
committerbors <bors@rust-lang.org>2019-08-14 07:08:50 +0000
commitc43d03a19f326f4a323569328cc501e86eb6d22e (patch)
treeb23585499e7030f4a92a0258242ad8fe36b91d53 /src/librustc_errors
parent60960a260f7b5c695fd0717311d72ce62dd4eb43 (diff)
parenta8bb3756b65c1193c72bf59f4095b1ab6e84743d (diff)
downloadrust-c43d03a19f326f4a323569328cc501e86eb6d22e.tar.gz
rust-c43d03a19f326f4a323569328cc501e86eb6d22e.zip
Auto merge of #63544 - Centril:rollup-qhqfcov, r=Centril
Rollup of 17 pull requests

Successful merges:

 - #62760 (Deduplicate error messages in `librsctc_mir`)
 - #62849 (typeck: Prohibit RPIT types that inherit lifetimes)
 - #63383 (`async fn` lifetime elision tests)
 - #63421 (Implement Clone, Display for ascii::EscapeDefault)
 - #63459 (syntax: account for CVarArgs being in the argument list.)
 - #63475 (Bring back suggestion for splitting `<-` into `< -`)
 - #63485 (ci: move mirrors to their standalone bucket)
 - #63486 (Document `From` trait for `BinaryHeap`)
 - #63488 (improve DiagnosticBuilder docs)
 - #63493 (Remove unneeded comment in src/libcore/hash/mod.rs)
 - #63499 (handle elision in async fn correctly)
 - #63501 (use `ParamName` to track in-scope lifetimes instead of Ident)
 - #63508 (Do not ICE when synthesizing spans falling inside unicode chars)
 - #63511 (ci: add a check for clock drift)
 - #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>)
 - #63529 (RELEASES.md: ? is one of three Kleene operators)
 - #63530 (Fix typo in error message.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/diagnostic.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index 424d7c00383..e11ba75da98 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -120,6 +120,9 @@ impl Diagnostic {
     }
 
     /// Adds a span/label to be included in the resulting snippet.
+    /// This label will be shown together with the original span/label used when creating the
+    /// diagnostic, *not* a span added by one of the `span_*` methods.
+    ///
     /// This is pushed onto the `MultiSpan` that was created when the
     /// diagnostic was first built. If you don't call this function at
     /// all, and you just supplied a `Span` to create the diagnostic,
@@ -196,6 +199,7 @@ impl Diagnostic {
         self
     }
 
+    /// Prints the span with a note above it.
     pub fn span_note<S: Into<MultiSpan>>(&mut self,
                                          sp: S,
                                          msg: &str)
@@ -209,6 +213,7 @@ impl Diagnostic {
         self
     }
 
+    /// Prints the span with a warn above it.
     pub fn span_warn<S: Into<MultiSpan>>(&mut self,
                                          sp: S,
                                          msg: &str)
@@ -222,6 +227,7 @@ impl Diagnostic {
         self
     }
 
+    /// Prints the span with some help above it.
     pub fn span_help<S: Into<MultiSpan>>(&mut self,
                                          sp: S,
                                          msg: &str)