summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-10-12 11:08:43 -0500
committerGitHub <noreply@github.com>2024-10-12 11:08:43 -0500
commit1fb64355c8d8557ec60c2b6f94f6ffe16790f169 (patch)
tree11158b16c36054319d157a603d1dc88e5415b40b /compiler
parentca3c822068c697c6c69d800f03b966c2153228b7 (diff)
parente5906e1591c0aa787003f89e3f3c9236c22f4832 (diff)
downloadrust-1fb64355c8d8557ec60c2b6f94f6ffe16790f169.tar.gz
rust-1fb64355c8d8557ec60c2b6f94f6ffe16790f169.zip
Rollup merge of #131590 - matthiaskrgr:clones3, r=compiler-errors
yeet some clones
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_borrowck/src/nll.rs2
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs
index f3207c26bfc..3674053409b 100644
--- a/compiler/rustc_borrowck/src/nll.rs
+++ b/compiler/rustc_borrowck/src/nll.rs
@@ -165,7 +165,7 @@ pub(crate) fn compute_regions<'a, 'tcx>(
         universe_causes,
         type_tests,
         liveness_constraints,
-        elements.clone(),
+        elements,
     );
 
     // If requested: dump NLL facts, and run legacy polonius analysis.
diff --git a/compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs b/compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs
index fab1906eecd..e3878d90e41 100644
--- a/compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs
@@ -312,7 +312,7 @@ pub(crate) fn expand_deriving_smart_ptr(
     impl_generics.params.insert(pointee_param_idx + 1, extra_param);
 
     // Add the impl blocks for `DispatchFromDyn` and `CoerceUnsized`.
-    let gen_args = vec![GenericArg::Type(alt_self_type.clone())];
+    let gen_args = vec![GenericArg::Type(alt_self_type)];
     add_impl_block(impl_generics.clone(), sym::DispatchFromDyn, gen_args.clone());
     add_impl_block(impl_generics.clone(), sym::CoerceUnsized, gen_args);
 }