From 672d370764862272735466346e9291dbf3163aeb Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Fri, 27 Aug 2021 18:28:22 -0500 Subject: 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. --- compiler/rustc_resolve/src/late/diagnostics.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/rustc_resolve/src') diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 9d923599db7..b3601ecf1d3 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -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); } _ => {} } -- cgit 1.4.1-3-g733a5