diff options
| author | Waffle Lapkin <waffle.lapkin@gmail.com> | 2024-05-02 17:49:23 +0200 |
|---|---|---|
| committer | Waffle Lapkin <waffle.lapkin@gmail.com> | 2024-05-02 17:49:23 +0200 |
| commit | 698d7a031eb65a9d47952f7ba3b13aa16fcbb11b (patch) | |
| tree | ea8cadc9b70bdb1e67afc69f40231016bf535768 /compiler/rustc_ty_utils/src | |
| parent | f92d49b7fe059e05eea43d7fc530aa96b8028fed (diff) | |
| download | rust-698d7a031eb65a9d47952f7ba3b13aa16fcbb11b.tar.gz rust-698d7a031eb65a9d47952f7ba3b13aa16fcbb11b.zip | |
Inline & delete `Ty::new_unit`, since it's just a field access
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/abi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index f0cea1f0baf..c6b83628506 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -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, |
