about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authordianne <diannes.gm@gmail.com>2025-01-08 17:58:34 -0800
committerdianne <diannes.gm@gmail.com>2025-01-08 17:59:27 -0800
commit72945beedd799c7debe0dddc14cc4e9a00943770 (patch)
treea671c94a2447fccb43c8b50c893d4cd8e4c598be /compiler/rustc_borrowck/src
parente26ff2f9086fc449b963df578f8641c31846abe6 (diff)
downloadrust-72945beedd799c7debe0dddc14cc4e9a00943770.tar.gz
rust-72945beedd799c7debe0dddc14cc4e9a00943770.zip
Remove special-casing for argument patterns in MIR typeck
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/type_check/mod.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs
index 889b5684a21..a1979c8b8ab 100644
--- a/compiler/rustc_borrowck/src/type_check/mod.rs
+++ b/compiler/rustc_borrowck/src/type_check/mod.rs
@@ -892,19 +892,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
                     Some(l) if !body.local_decls[l].is_user_variable() => {
                         ConstraintCategory::Boring
                     }
-                    Some(_)
-                        if let Some(body_id) = tcx
-                            .hir_node_by_def_id(body.source.def_id().expect_local())
-                            .body_id()
-                            && let params = tcx.hir().body(body_id).params
-                            && params
-                                .iter()
-                                .any(|param| param.span.contains(stmt.source_info.span)) =>
-                    {
-                        // Assignments generated from lowering argument patterns shouldn't be called
-                        // "assignments" in diagnostics and aren't interesting to blame for errors.
-                        ConstraintCategory::Boring
-                    }
                     _ => ConstraintCategory::Assignment,
                 };
                 debug!(