@@ -12,7 +12,6 @@ use rand::rngs::StdRng;
1212use rand:: Rng ;
1313use rand:: SeedableRng ;
1414
15- use rustc_ast:: ast:: Mutability ;
1615use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
1716#[ allow( unused) ]
1817use rustc_data_structures:: static_assert_size;
@@ -22,7 +21,7 @@ use rustc_middle::{
2221 ty:: {
2322 self ,
2423 layout:: { LayoutCx , LayoutError , LayoutOf , TyAndLayout } ,
25- Instance , Ty , TyCtxt , TypeAndMut ,
24+ Instance , Ty , TyCtxt ,
2625 } ,
2726} ;
2827use rustc_span:: def_id:: { CrateNum , DefId } ;
@@ -373,10 +372,8 @@ pub struct PrimitiveLayouts<'tcx> {
373372impl < ' mir , ' tcx : ' mir > PrimitiveLayouts < ' tcx > {
374373 fn new ( layout_cx : LayoutCx < ' tcx , TyCtxt < ' tcx > > ) -> Result < Self , & ' tcx LayoutError < ' tcx > > {
375374 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 ) ;
380377 Ok ( Self {
381378 unit : layout_cx. layout_of ( Ty :: new_unit ( tcx) ) ?,
382379 i8 : layout_cx. layout_of ( tcx. types . i8 ) ?,
0 commit comments