@@ -21,7 +21,6 @@ use rustc_target::abi::call::{
21
21
} ;
22
22
use rustc_target:: abi:: * ;
23
23
use rustc_target:: spec:: { abi:: Abi as SpecAbi , HasTargetSpec , PanicStrategy , Target } ;
24
- use rustc_type_ir:: TraitObjectRepresentation ;
25
24
26
25
use std:: cmp:: { self , Ordering } ;
27
26
use std:: fmt;
@@ -626,7 +625,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
626
625
tcx. intern_layout ( self . scalar_pair ( data_ptr, metadata) )
627
626
}
628
627
629
- ty:: Dynamic ( _, _, TraitObjectRepresentation :: Sized ) => {
628
+ ty:: Dynamic ( _, _, ty :: DynStar ) => {
630
629
let mut pointer = scalar_unit ( Pointer ) ;
631
630
pointer. valid_range_mut ( ) . start = 1 ;
632
631
let mut vtable = scalar_unit ( Pointer ) ;
@@ -688,7 +687,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
688
687
689
688
// Odd unit types.
690
689
ty:: FnDef ( ..) => univariant ( & [ ] , & ReprOptions :: default ( ) , StructKind :: AlwaysSized ) ?,
691
- ty:: Dynamic ( _, _, TraitObjectRepresentation :: Unsized ) | ty:: Foreign ( ..) => {
690
+ ty:: Dynamic ( _, _, ty :: Dyn ) | ty:: Foreign ( ..) => {
692
691
let mut unit = self . univariant_uninterned (
693
692
ty,
694
693
& [ ] ,
@@ -2444,7 +2443,7 @@ where
2444
2443
| ty:: FnDef ( ..)
2445
2444
| ty:: GeneratorWitness ( ..)
2446
2445
| ty:: Foreign ( ..)
2447
- | ty:: Dynamic ( _, _, TraitObjectRepresentation :: Unsized ) => {
2446
+ | ty:: Dynamic ( _, _, ty :: Dyn ) => {
2448
2447
bug ! ( "TyAndLayout::field({:?}): not applicable" , this)
2449
2448
}
2450
2449
@@ -2546,9 +2545,7 @@ where
2546
2545
}
2547
2546
2548
2547
// dyn* (both fields are usize-sized)
2549
- ty:: Dynamic ( _, _, TraitObjectRepresentation :: Sized ) => {
2550
- TyMaybeWithLayout :: Ty ( tcx. types . usize )
2551
- }
2548
+ ty:: Dynamic ( _, _, ty:: DynStar ) => TyMaybeWithLayout :: Ty ( tcx. types . usize ) ,
2552
2549
2553
2550
ty:: Projection ( _)
2554
2551
| ty:: Bound ( ..)
0 commit comments