We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe6ce8a commit d815fa4Copy full SHA for d815fa4
src/machine.rs
@@ -374,9 +374,9 @@ impl<'mir, 'tcx: 'mir> PrimitiveLayouts<'tcx> {
374
fn new(layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, &'tcx LayoutError<'tcx>> {
375
let tcx = layout_cx.tcx;
376
let mut_raw_ptr =
377
- Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Mut });
+ Ty::new_mut_ptr(tcx, tcx.types.unit);
378
let const_raw_ptr =
379
- Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Not });
+ Ty::new_imm_ptr(tcx, tcx.types.unit);
380
Ok(Self {
381
unit: layout_cx.layout_of(Ty::new_unit(tcx))?,
382
i8: layout_cx.layout_of(tcx.types.i8)?,
0 commit comments