@@ -20,8 +20,8 @@ use rustc_middle::ty::{
20
20
use rustc_middle:: ty:: { List , TypeFoldable } ;
21
21
use rustc_span:: def_id:: DefId ;
22
22
use rustc_target:: abi:: {
23
- Abi :: Vector , FieldsShape , Integer , LayoutS , Primitive , Size , TagEncoding , TyAndLayout ,
24
- VariantIdx , Variants ,
23
+ Abi :: Vector , FieldIdx , FieldsShape , Integer , LayoutS , Primitive , Size , TagEncoding ,
24
+ TyAndLayout , VariantIdx , Variants ,
25
25
} ;
26
26
use rustc_target:: spec:: abi:: Abi ;
27
27
use std:: iter;
@@ -870,7 +870,7 @@ impl<'tcx> GotocCtx<'tcx> {
870
870
fn codegen_alignment_padding (
871
871
& self ,
872
872
size : Size ,
873
- layout : & LayoutS ,
873
+ layout : & LayoutS < FieldIdx , VariantIdx > ,
874
874
idx : usize ,
875
875
) -> Option < DatatypeComponent > {
876
876
let align = Size :: from_bits ( layout. align . abi . bits ( ) ) ;
@@ -895,7 +895,7 @@ impl<'tcx> GotocCtx<'tcx> {
895
895
fn codegen_struct_fields (
896
896
& mut self ,
897
897
flds : Vec < ( String , Ty < ' tcx > ) > ,
898
- layout : & LayoutS ,
898
+ layout : & LayoutS < FieldIdx , VariantIdx > ,
899
899
initial_offset : Size ,
900
900
) -> Vec < DatatypeComponent > {
901
901
match & layout. fields {
@@ -1352,7 +1352,7 @@ impl<'tcx> GotocCtx<'tcx> {
1352
1352
& mut self ,
1353
1353
variant : & VariantDef ,
1354
1354
subst : & ' tcx GenericArgsRef < ' tcx > ,
1355
- layout : & LayoutS ,
1355
+ layout : & LayoutS < FieldIdx , VariantIdx > ,
1356
1356
initial_offset : Size ,
1357
1357
) -> Vec < DatatypeComponent > {
1358
1358
let flds: Vec < _ > =
@@ -1521,7 +1521,7 @@ impl<'tcx> GotocCtx<'tcx> {
1521
1521
ty : Ty < ' tcx > ,
1522
1522
adtdef : & ' tcx AdtDef ,
1523
1523
subst : & ' tcx GenericArgsRef < ' tcx > ,
1524
- variants : & IndexVec < VariantIdx , LayoutS > ,
1524
+ variants : & IndexVec < VariantIdx , LayoutS < FieldIdx , VariantIdx > > ,
1525
1525
) -> Type {
1526
1526
let non_zst_count = variants. iter ( ) . filter ( |layout| layout. size . bytes ( ) > 0 ) . count ( ) ;
1527
1527
let mangled_name = self . ty_mangled_name ( ty) ;
@@ -1540,7 +1540,7 @@ impl<'tcx> GotocCtx<'tcx> {
1540
1540
1541
1541
pub ( crate ) fn variant_min_offset (
1542
1542
& self ,
1543
- variants : & IndexVec < VariantIdx , LayoutS > ,
1543
+ variants : & IndexVec < VariantIdx , LayoutS < FieldIdx , VariantIdx > > ,
1544
1544
) -> Option < Size > {
1545
1545
variants
1546
1546
. iter ( )
@@ -1625,7 +1625,7 @@ impl<'tcx> GotocCtx<'tcx> {
1625
1625
pretty_name : InternedString ,
1626
1626
def : & ' tcx AdtDef ,
1627
1627
subst : & ' tcx GenericArgsRef < ' tcx > ,
1628
- layouts : & IndexVec < VariantIdx , LayoutS > ,
1628
+ layouts : & IndexVec < VariantIdx , LayoutS < FieldIdx , VariantIdx > > ,
1629
1629
initial_offset : Size ,
1630
1630
) -> Vec < DatatypeComponent > {
1631
1631
def. variants ( )
@@ -1657,7 +1657,7 @@ impl<'tcx> GotocCtx<'tcx> {
1657
1657
pretty_name : InternedString ,
1658
1658
case : & VariantDef ,
1659
1659
subst : & ' tcx GenericArgsRef < ' tcx > ,
1660
- variant : & LayoutS ,
1660
+ variant : & LayoutS < FieldIdx , VariantIdx > ,
1661
1661
initial_offset : Size ,
1662
1662
) -> Type {
1663
1663
let case_name = format ! ( "{name}::{}" , case. name) ;
0 commit comments