Remove Session.if_let_suggestions
We can instead if either the LHS or RHS types contain `TyKind::Error`. In addition to covering the case where we would have previously updated `if_let_suggestions`, this might also prevent redundant errors in other cases as well.
This commit is contained in:
parent
dfd84729d6
commit
672d370764
5 changed files with 17 additions and 9 deletions
|
@ -215,7 +215,6 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
|||
"let ".to_string(),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
self.r.session.if_let_suggestions.borrow_mut().insert(*span);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue