about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-18 16:23:33 +0100
committerGitHub <noreply@github.com>2022-02-18 16:23:33 +0100
commita144ea1c4b39bdef608c537b25343674aa2b5bc7 (patch)
treef254265efe6fcda78534a586983a65940f4d6f1d /compiler/rustc_codegen_ssa/src
parentf1c918f1f3166c1cb2624ce2e2783d357e70dc3d (diff)
parentb80057d08d9f1b1726ec99dc57296cffec246bb1 (diff)
downloadrust-a144ea1c4b39bdef608c537b25343674aa2b5bc7.tar.gz
rust-a144ea1c4b39bdef608c537b25343674aa2b5bc7.zip
Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obk
compiler: clippy::complexity fixes

useless_format
map_flatten
useless_conversion
needless_bool
filter_next
clone_on_copy
needless_option_as_deref
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/place.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/place.rs b/compiler/rustc_codegen_ssa/src/mir/place.rs
index c21d19a6227..6976999c0e4 100644
--- a/compiler/rustc_codegen_ssa/src/mir/place.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/place.rs
@@ -476,7 +476,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                 mir::ProjectionElem::Subslice { from, to, from_end } => {
                     let mut subslice = cg_base.project_index(bx, bx.cx().const_usize(from as u64));
                     let projected_ty =
-                        PlaceTy::from_ty(cg_base.layout.ty).projection_ty(tcx, elem.clone()).ty;
+                        PlaceTy::from_ty(cg_base.layout.ty).projection_ty(tcx, *elem).ty;
                     subslice.layout = bx.cx().layout_of(self.monomorphize(projected_ty));
 
                     if subslice.layout.is_unsized() {