Auto merge of #113377 - BoxyUwU:move_ty_ctors_to_ty, r=compiler-errors

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

Part of rust-lang/compiler-team#616

turns out there's a lot of places we construct `Ty` this is a ridiculously huge PR :S

r? `@oli-obk`
This commit is contained in:
bors 2023-07-06 08:10:42 +00:00
commit 4dd1719b34
165 changed files with 1388 additions and 1187 deletions

View file

@ -454,7 +454,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
ty::Array(ct, _)
if (*ct == cx.tcx.types.u8) || cx.layout_of(*ct).is_zst() =>
{
cx.tcx.mk_imm_ptr(*ct)
Ty::new_imm_ptr(cx.tcx, *ct)
}
_ => t,
};