Auto merge of #89427 - estebank:collect-overlapping-impls, r=jackh726
Point at overlapping impls when type annotations are needed Address https://github.com/rust-lang/rust/issues/89254.
This commit is contained in:
commit
41d8c94d45
38 changed files with 666 additions and 121 deletions
|
@ -465,10 +465,14 @@ impl Diagnostic {
|
|||
suggestions: impl Iterator<Item = String>,
|
||||
applicability: Applicability,
|
||||
) -> &mut Self {
|
||||
let mut suggestions: Vec<_> = suggestions.collect();
|
||||
suggestions.sort();
|
||||
let substitutions = suggestions
|
||||
.into_iter()
|
||||
.map(|snippet| Substitution { parts: vec![SubstitutionPart { snippet, span: sp }] })
|
||||
.collect();
|
||||
self.suggestions.push(CodeSuggestion {
|
||||
substitutions: suggestions
|
||||
.map(|snippet| Substitution { parts: vec![SubstitutionPart { snippet, span: sp }] })
|
||||
.collect(),
|
||||
substitutions,
|
||||
msg: msg.to_owned(),
|
||||
style: SuggestionStyle::ShowCode,
|
||||
applicability,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue