parent
7c7bb7dc01
commit
67a85925b1
4 changed files with 52 additions and 4 deletions
|
@ -894,10 +894,13 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
|
||||
// If the trait has a single item (which wasn't matched by the algorithm), suggest it
|
||||
let suggestion = self.get_single_associated_item(path, &source, is_expected);
|
||||
if !self.r.add_typo_suggestion(err, suggestion, ident_span) {
|
||||
fallback = !self.let_binding_suggestion(err, ident_span);
|
||||
}
|
||||
self.r.add_typo_suggestion(err, suggestion, ident_span);
|
||||
}
|
||||
|
||||
if self.let_binding_suggestion(err, ident_span) {
|
||||
fallback = false;
|
||||
}
|
||||
|
||||
fallback
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue