Skip to content

Commit d815fa4

Browse files
Eagerly convert some ctors to use their specialized ctors
1 parent fe6ce8a commit d815fa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ impl<'mir, 'tcx: 'mir> PrimitiveLayouts<'tcx> {
374374
fn new(layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, &'tcx LayoutError<'tcx>> {
375375
let tcx = layout_cx.tcx;
376376
let mut_raw_ptr =
377-
Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Mut });
377+
Ty::new_mut_ptr(tcx, tcx.types.unit);
378378
let const_raw_ptr =
379-
Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Not });
379+
Ty::new_imm_ptr(tcx, tcx.types.unit);
380380
Ok(Self {
381381
unit: layout_cx.layout_of(Ty::new_unit(tcx))?,
382382
i8: layout_cx.layout_of(tcx.types.i8)?,

0 commit comments

Comments
 (0)