about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-12-15 23:19:51 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2023-12-15 23:19:51 +0100
commit74d81d15b400590b39b9f3ab08f45eaf557aca17 (patch)
tree02cb0698137b402368a8a3cc7f897ee4f6c9f25c /compiler/rustc_codegen_llvm/src/builder.rs
parenta96d57bdb6d2bb6d233d7d5aaefc2995ab99be01 (diff)
downloadrust-74d81d15b400590b39b9f3ab08f45eaf557aca17.tar.gz
rust-74d81d15b400590b39b9f3ab08f45eaf557aca17.zip
NFC: do not clone types that are copy
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index f4b9296dbbd..8f60175a603 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -353,7 +353,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
         let new_kind = match ty.kind() {
             Int(t @ Isize) => Int(t.normalize(self.tcx.sess.target.pointer_width)),
             Uint(t @ Usize) => Uint(t.normalize(self.tcx.sess.target.pointer_width)),
-            t @ (Uint(_) | Int(_)) => t.clone(),
+            t @ (Uint(_) | Int(_)) => *t,
             _ => panic!("tried to get overflow intrinsic for op applied to non-int type"),
         };