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

@@ -997,7 +997,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
match self.unit_temp {
Some(tmp) => tmp,
None => {
let ty = Ty::new_unit(self.tcx);
let ty = self.tcx.types.unit;
let fn_span = self.fn_span;
let tmp = self.temp(ty, fn_span);
self.unit_temp = Some(tmp);