@@ -12,7 +12,6 @@ use rand::rngs::StdRng;
12
12
use rand:: Rng ;
13
13
use rand:: SeedableRng ;
14
14
15
- use rustc_ast:: ast:: Mutability ;
16
15
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
17
16
#[ allow( unused) ]
18
17
use rustc_data_structures:: static_assert_size;
@@ -22,7 +21,7 @@ use rustc_middle::{
22
21
ty:: {
23
22
self ,
24
23
layout:: { LayoutCx , LayoutError , LayoutOf , TyAndLayout } ,
25
- Instance , Ty , TyCtxt , TypeAndMut ,
24
+ Instance , Ty , TyCtxt ,
26
25
} ,
27
26
} ;
28
27
use rustc_span:: def_id:: { CrateNum , DefId } ;
@@ -373,10 +372,8 @@ pub struct PrimitiveLayouts<'tcx> {
373
372
impl < ' mir , ' tcx : ' mir > PrimitiveLayouts < ' tcx > {
374
373
fn new ( layout_cx : LayoutCx < ' tcx , TyCtxt < ' tcx > > ) -> Result < Self , & ' tcx LayoutError < ' tcx > > {
375
374
let tcx = layout_cx. tcx ;
376
- let mut_raw_ptr =
377
- Ty :: new_ptr ( tcx, TypeAndMut { ty : tcx. types . unit , mutbl : Mutability :: Mut } ) ;
378
- let const_raw_ptr =
379
- Ty :: new_ptr ( tcx, TypeAndMut { ty : tcx. types . unit , mutbl : Mutability :: Not } ) ;
375
+ let mut_raw_ptr = Ty :: new_mut_ptr ( tcx, tcx. types . unit ) ;
376
+ let const_raw_ptr = Ty :: new_imm_ptr ( tcx, tcx. types . unit ) ;
380
377
Ok ( Self {
381
378
unit : layout_cx. layout_of ( Ty :: new_unit ( tcx) ) ?,
382
379
i8 : layout_cx. layout_of ( tcx. types . i8 ) ?,
0 commit comments