about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-06-05 15:28:50 -0700
committerMichael Howell <michael@notriddle.com>2023-06-05 19:05:15 -0700
commit467bc9ffd56dc31d6db79820bd07dbdd5f653783 (patch)
tree15d5b3ecb2b2de52a2ee3b45578b66137225907c /compiler/rustc_trait_selection
parent408bbd040613f6776e0a7d05d582c81f4ddc189a (diff)
downloadrust-467bc9ffd56dc31d6db79820bd07dbdd5f653783.tar.gz
rust-467bc9ffd56dc31d6db79820bd07dbdd5f653783.zip
diagnostics: do not suggest type name tweaks on type-inferred closure args
Fixes #111932
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 42038dbc3d8..01f2782fd28 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -2807,8 +2807,8 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                     err.help("unsized locals are gated as an unstable feature");
                 }
             }
-            ObligationCauseCode::SizedArgumentType(sp) => {
-                if let Some(span) = sp {
+            ObligationCauseCode::SizedArgumentType(ty_span) => {
+                if let Some(span) = ty_span {
                     if let ty::PredicateKind::Clause(clause) = predicate.kind().skip_binder()
                         && let ty::Clause::Trait(trait_pred) = clause
                         && let ty::Dynamic(..) = trait_pred.self_ty().kind()