Remove one more usage of mk_substs_trait
This commit is contained in:
parent
1bf80249ae
commit
4ffe3bdf99
3 changed files with 8 additions and 4 deletions
|
@ -614,7 +614,6 @@ where
|
|||
let drop_trait = tcx.require_lang_item(LangItem::Drop, None);
|
||||
let drop_fn = tcx.associated_item_def_ids(drop_trait)[0];
|
||||
let ty = self.place_ty(self.place);
|
||||
let substs = tcx.mk_substs_trait(ty, []);
|
||||
|
||||
let ref_ty =
|
||||
tcx.mk_ref(tcx.lifetimes.re_erased, ty::TypeAndMut { ty, mutbl: hir::Mutability::Mut });
|
||||
|
@ -632,7 +631,12 @@ where
|
|||
)],
|
||||
terminator: Some(Terminator {
|
||||
kind: TerminatorKind::Call {
|
||||
func: Operand::function_handle(tcx, drop_fn, substs, self.source_info.span),
|
||||
func: Operand::function_handle(
|
||||
tcx,
|
||||
drop_fn,
|
||||
[ty.into()],
|
||||
self.source_info.span,
|
||||
),
|
||||
args: vec![Operand::Move(Place::from(ref_place))],
|
||||
destination: unit_temp,
|
||||
target: Some(succ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue