about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-13 10:37:19 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-14 15:36:39 +0000
commit0fe86aa977f8e8f2ebd2e6a6bd9b1a51c959cd4f (patch)
tree50af45bb6ae9cda6d08c56370b4d48e83a759798 /compiler/rustc_mir_transform
parent7fd9beedc230d0b0fc0b98e1db7855f88122df30 (diff)
downloadrust-0fe86aa977f8e8f2ebd2e6a6bd9b1a51c959cd4f.tar.gz
rust-0fe86aa977f8e8f2ebd2e6a6bd9b1a51c959cd4f.zip
Let `mk_fn_def` take an iterator instead to simplify some call sites
Diffstat (limited to 'compiler/rustc_mir_transform')
-rw-r--r--compiler/rustc_mir_transform/src/shim.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs
index f92a0e826dc..ec84243fbeb 100644
--- a/compiler/rustc_mir_transform/src/shim.rs
+++ b/compiler/rustc_mir_transform/src/shim.rs
@@ -417,10 +417,8 @@ impl<'tcx> CloneShimBuilder<'tcx> {
     ) {
         let tcx = self.tcx;
 
-        let substs = tcx.mk_substs_trait(ty, []);
-
         // `func == Clone::clone(&ty) -> ty`
-        let func_ty = tcx.mk_fn_def(self.def_id, substs);
+        let func_ty = tcx.mk_fn_def(self.def_id, [ty]);
         let func = Operand::Constant(Box::new(Constant {
             span: self.span,
             user_ty: None,