@@ -12,7 +12,7 @@ use rustc_middle::query::Providers;
1212use rustc_middle:: ty:: layout:: { FnAbiOf , LayoutOf , TyAndLayout } ;
1313use rustc_middle:: ty:: GenericArgsRef ;
1414use rustc_middle:: ty:: {
15- self , Const , FloatTy , GeneratorArgs , IntTy , ParamEnv , PolyFnSig , Ty , TyCtxt , TyKind ,
15+ self , Const , CoroutineArgs , FloatTy , IntTy , ParamEnv , PolyFnSig , Ty , TyCtxt , TyKind ,
1616 TypeAndMut , UintTy ,
1717} ;
1818use rustc_middle:: { bug, span_bug} ;
@@ -64,6 +64,9 @@ pub(crate) fn provide(providers: &mut Providers) {
6464 ) -> & ' tcx FnAbi < ' tcx , Ty < ' tcx > > {
6565 let readjust_arg_abi = |arg : & ArgAbi < ' tcx , Ty < ' tcx > > | {
6666 let mut arg = ArgAbi :: new ( & tcx, arg. layout , |_, _, _| ArgAttributes :: new ( ) ) ;
67+ // FIXME: this is bad! https://github.com/rust-lang/rust/issues/115666
68+ // <https://github.com/rust-lang/rust/commit/eaaa03faf77b157907894a4207d8378ecaec7b45>
69+ arg. make_direct_deprecated ( ) ;
6770
6871 // Avoid pointlessly passing ZSTs, just like the official Rust ABI.
6972 if arg. layout . is_zst ( ) {
@@ -96,7 +99,9 @@ pub(crate) fn provide(providers: &mut Providers) {
9699
97100 // FIXME(eddyb) remove this by deriving `Clone` for `LayoutS` upstream.
98101 // FIXME(eddyb) the `S` suffix is a naming antipattern, rename upstream.
99- fn clone_layout ( layout : & LayoutS ) -> LayoutS {
102+ fn clone_layout < FieldIdx : Idx , VariantIdx : Idx > (
103+ layout : & LayoutS < FieldIdx , VariantIdx > ,
104+ ) -> LayoutS < FieldIdx , VariantIdx > {
100105 let LayoutS {
101106 ref fields,
102107 ref variants,
@@ -744,7 +749,7 @@ fn trans_struct<'tcx>(cx: &CodegenCx<'tcx>, span: Span, ty: TyAndLayout<'tcx>) -
744749fn def_id_for_spirv_type_adt ( layout : TyAndLayout < ' _ > ) -> Option < DefId > {
745750 match * layout. ty . kind ( ) {
746751 TyKind :: Adt ( def, _) => Some ( def. did ( ) ) ,
747- TyKind :: Foreign ( def_id) | TyKind :: Closure ( def_id, _) | TyKind :: Generator ( def_id, ..) => {
752+ TyKind :: Foreign ( def_id) | TyKind :: Closure ( def_id, _) | TyKind :: Coroutine ( def_id, ..) => {
748753 Some ( def_id)
749754 }
750755 _ => None ,
@@ -779,8 +784,8 @@ impl fmt::Display for TyLayoutNameKey<'_> {
779784 write ! ( f, "::{}" , def. variants( ) [ index] . name) ?;
780785 }
781786 }
782- if let ( TyKind :: Generator ( _, _, _) , Some ( index) ) = ( self . ty . kind ( ) , self . variant ) {
783- write ! ( f, "::{}" , GeneratorArgs :: variant_name( index) ) ?;
787+ if let ( TyKind :: Coroutine ( _, _, _) , Some ( index) ) = ( self . ty . kind ( ) , self . variant ) {
788+ write ! ( f, "::{}" , CoroutineArgs :: variant_name( index) ) ?;
784789 }
785790 Ok ( ( ) )
786791 }
0 commit comments