Skip to content

Commit a95d97a

Browse files
Rollup merge of #45486 - oli-obk:patch-9, r=kennytm
Update docs for Diagnostic::span_suggestion(s)
2 parents e09585c + 1ce1d99 commit a95d97a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_errors/diagnostic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ impl Diagnostic {
229229
/// "try adding parentheses: `(tup.0).1`"
230230
///
231231
/// The message
232+
///
232233
/// * should not end in any punctuation (a `:` is added automatically)
233234
/// * should not be a question
234235
/// * should not contain any parts like "the following", "as shown"
@@ -248,6 +249,7 @@ impl Diagnostic {
248249
self
249250
}
250251

252+
/// Prints out a message with multiple suggested edits of the code.
251253
pub fn span_suggestions(&mut self, sp: Span, msg: &str, suggestions: Vec<String>) -> &mut Self {
252254
self.suggestions.push(CodeSuggestion {
253255
substitution_parts: vec![Substitution {

0 commit comments

Comments
 (0)