diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-10-25 09:48:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-25 09:48:11 +0200 |
| commit | a95d97a46bf3dac6026e05b00720ab7feff9a4df (patch) | |
| tree | 0754659db9e539a4c61ddcbeda12a4ca73685560 | |
| parent | e09585c7c2443699c892c43820e9dd4a575164dc (diff) | |
| parent | 1ce1d99b2563bd1eba25bb831c97671d0b2347c2 (diff) | |
| download | rust-a95d97a46bf3dac6026e05b00720ab7feff9a4df.tar.gz rust-a95d97a46bf3dac6026e05b00720ab7feff9a4df.zip | |
Rollup merge of #45486 - oli-obk:patch-9, r=kennytm
Update docs for Diagnostic::span_suggestion(s)
| -rw-r--r-- | src/librustc_errors/diagnostic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index 02c0307e98c..f560622c297 100644 --- a/src/librustc_errors/diagnostic.rs +++ b/src/librustc_errors/diagnostic.rs @@ -229,6 +229,7 @@ impl Diagnostic { /// "try adding parentheses: `(tup.0).1`" /// /// The message + /// /// * should not end in any punctuation (a `:` is added automatically) /// * should not be a question /// * should not contain any parts like "the following", "as shown" @@ -248,6 +249,7 @@ impl Diagnostic { self } + /// Prints out a message with multiple suggested edits of the code. pub fn span_suggestions(&mut self, sp: Span, msg: &str, suggestions: Vec<String>) -> &mut Self { self.suggestions.push(CodeSuggestion { substitution_parts: vec