Move TyCtxt::mk_x to Ty::new_x where applicable

This commit is contained in:
Boxy 2023-07-05 20:13:26 +01:00
parent 5dac6b320b
commit 12138b8e5e
164 changed files with 1386 additions and 1185 deletions

View file

@ -199,7 +199,7 @@ fn vtable_ptr_ty<'tcx, Cx: CodegenMethods<'tcx>>(
cx.scalar_pair_element_backend_type(
cx.layout_of(match kind {
// vtable is the second field of `*mut dyn Trait`
ty::Dyn => cx.tcx().mk_mut_ptr(target),
ty::Dyn => Ty::new_mut_ptr(cx.tcx(), target),
// vtable is the second field of `dyn* Trait`
ty::DynStar => target,
}),