1
Fork 0

Let mk_fn_def take an iterator instead to simplify some call sites

This commit is contained in:
Oli Scherer 2022-12-13 10:37:19 +00:00
parent 7fd9beedc2
commit 0fe86aa977
4 changed files with 14 additions and 10 deletions

View file

@ -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,