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
|
@ -209,9 +209,6 @@ pub struct Session {
|
|||
|
||||
/// Set of enabled features for the current target.
|
||||
pub target_features: FxHashSet<Symbol>,
|
||||
|
||||
/// `Span`s for `if` conditions that we have suggested turning into `if let`.
|
||||
pub if_let_suggestions: Lock<FxHashSet<Span>>,
|
||||
}
|
||||
|
||||
pub struct PerfStats {
|
||||
|
@ -1328,7 +1325,6 @@ pub fn build_session(
|
|||
miri_unleashed_features: Lock::new(Default::default()),
|
||||
asm_arch,
|
||||
target_features: FxHashSet::default(),
|
||||
if_let_suggestions: Default::default(),
|
||||
};
|
||||
|
||||
validate_commandline_args_with_session_available(&sess);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue