Inline & delete Ty::new_unit, since it's just a field access

This commit is contained in:
Waffle Lapkin 2024-05-02 17:49:23 +02:00
parent f92d49b7fe
commit 698d7a031e
19 changed files with 50 additions and 56 deletions

View file

@ -854,7 +854,7 @@ fn make_thin_self_ptr<'tcx>(
// we now have a type like `*mut RcBox<dyn Trait>`
// change its layout to that of `*mut ()`, a thin pointer, but keep the same type
// this is understood as a special case elsewhere in the compiler
let unit_ptr_ty = Ty::new_mut_ptr(tcx, Ty::new_unit(tcx));
let unit_ptr_ty = Ty::new_mut_ptr(tcx, tcx.types.unit);
TyAndLayout {
ty: fat_pointer_ty,