From 1ce1d99b2563bd1eba25bb831c97671d0b2347c2 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 24 Oct 2017 13:08:30 +0200 Subject: [PATCH] Update docs for Diagnostic::span_suggestion(s) --- src/librustc_errors/diagnostic.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index 02c0307e98cc8..f560622c2975d 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) -> &mut Self { self.suggestions.push(CodeSuggestion { substitution_parts: vec![Substitution {