@@ -21,7 +21,6 @@ use rustc_target::abi::call::{
2121} ;
2222use rustc_target:: abi:: * ;
2323use rustc_target:: spec:: { abi:: Abi as SpecAbi , HasTargetSpec , PanicStrategy , Target } ;
24- use rustc_type_ir:: TraitObjectRepresentation ;
2524
2625use std:: cmp:: { self , Ordering } ;
2726use std:: fmt;
@@ -626,7 +625,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
626625 tcx. intern_layout ( self . scalar_pair ( data_ptr, metadata) )
627626 }
628627
629- ty:: Dynamic ( _, _, TraitObjectRepresentation :: Sized ) => {
628+ ty:: Dynamic ( _, _, ty :: DynStar ) => {
630629 let mut pointer = scalar_unit ( Pointer ) ;
631630 pointer. valid_range_mut ( ) . start = 1 ;
632631 let mut vtable = scalar_unit ( Pointer ) ;
@@ -688,7 +687,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
688687
689688 // Odd unit types.
690689 ty:: FnDef ( ..) => univariant ( & [ ] , & ReprOptions :: default ( ) , StructKind :: AlwaysSized ) ?,
691- ty:: Dynamic ( _, _, TraitObjectRepresentation :: Unsized ) | ty:: Foreign ( ..) => {
690+ ty:: Dynamic ( _, _, ty :: Dyn ) | ty:: Foreign ( ..) => {
692691 let mut unit = self . univariant_uninterned (
693692 ty,
694693 & [ ] ,
@@ -2444,7 +2443,7 @@ where
24442443 | ty:: FnDef ( ..)
24452444 | ty:: GeneratorWitness ( ..)
24462445 | ty:: Foreign ( ..)
2447- | ty:: Dynamic ( _, _, TraitObjectRepresentation :: Unsized ) => {
2446+ | ty:: Dynamic ( _, _, ty :: Dyn ) => {
24482447 bug ! ( "TyAndLayout::field({:?}): not applicable" , this)
24492448 }
24502449
@@ -2546,9 +2545,7 @@ where
25462545 }
25472546
25482547 // 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 ) ,
25522549
25532550 ty:: Projection ( _)
25542551 | ty:: Bound ( ..)
0 commit comments