From 0fe86aa977f8e8f2ebd2e6a6bd9b1a51c959cd4f Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 13 Dec 2022 10:37:19 +0000 Subject: Let `mk_fn_def` take an iterator instead to simplify some call sites --- compiler/rustc_mir_transform/src/shim.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_mir_transform/src') 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, -- cgit 1.4.1-3-g733a5