about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-04 00:29:52 +0000
committerbors <bors@rust-lang.org>2023-11-04 00:29:52 +0000
commitf1b104f52350c800f78d4372aec52080bd6f9164 (patch)
tree350e648bf3fbd30941aedff65a7e2ad3d0419b44 /compiler
parent5020f7c3b8bd8bf57077389bca5c19f7911fde7a (diff)
parent1ba97cb1cc68bb0a2a90c003f33600144da00d0d (diff)
downloadrust-f1b104f52350c800f78d4372aec52080bd6f9164.tar.gz
rust-f1b104f52350c800f78d4372aec52080bd6f9164.zip
Auto merge of #117540 - matthiaskrgr:baby_dont_clone_me_dont_clone_me_no_more, r=est31
clone less
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs2
-rw-r--r--compiler/rustc_mir_build/src/build/matches/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
index ebb9e6f42d9..6424d1c7931 100644
--- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
+++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
@@ -880,7 +880,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
                             (pair, r)
                         })
                         .unzip();
-                self.record_late_bound_vars(hir_id, binders.clone());
+                self.record_late_bound_vars(hir_id, binders);
                 // Even if there are no lifetimes defined here, we still wrap it in a binder
                 // scope. If there happens to be a nested poly trait ref (an error), that
                 // will be `Concatenating` anyways, so we don't have to worry about the depth
diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs
index c3e1b55e463..a43aae6f449 100644
--- a/compiler/rustc_mir_build/src/build/matches/mod.rs
+++ b/compiler/rustc_mir_build/src/build/matches/mod.rs
@@ -856,7 +856,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
             }
 
             PatKind::InlineConstant { ref subpattern, .. } => {
-                self.visit_primary_bindings(subpattern, pattern_user_ty.clone(), f)
+                self.visit_primary_bindings(subpattern, pattern_user_ty, f)
             }
 
             PatKind::Leaf { ref subpatterns } => {