mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-17 18:23:16 +00:00
Update docs for Diagnostic::span_suggestion(s)
This commit is contained in:
parent
a789fa0440
commit
1ce1d99b25
@ -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![Substitution {
|
||||
|
Loading…
Reference in New Issue
Block a user