@@ -1532,10 +1532,10 @@ pub struct LayoutS {
1532
1532
pub align : AbiAndPrefAlign ,
1533
1533
pub size : Size ,
1534
1534
1535
- /// True if the alignment was explicitly requested with `repr(align)`.
1535
+ /// The alignment explicitly requested with `repr(align)`.
1536
1536
/// Only used on i686-windows, where the argument passing ABI is different when alignment is
1537
- /// requested, even if the requested alignment is equal to or less than the natural alignment.
1538
- pub has_repr_align : bool ,
1537
+ /// requested, even if the requested alignment is equal to the natural alignment.
1538
+ pub repr_align : Option < Align > ,
1539
1539
}
1540
1540
1541
1541
impl LayoutS {
@@ -1550,7 +1550,7 @@ impl LayoutS {
1550
1550
largest_niche,
1551
1551
size,
1552
1552
align,
1553
- has_repr_align : false ,
1553
+ repr_align : None ,
1554
1554
}
1555
1555
}
1556
1556
}
@@ -1560,15 +1560,15 @@ impl fmt::Debug for LayoutS {
1560
1560
// This is how `Layout` used to print before it become
1561
1561
// `Interned<LayoutS>`. We print it like this to avoid having to update
1562
1562
// expected output in a lot of tests.
1563
- let LayoutS { size, align, abi, fields, largest_niche, variants, has_repr_align } = self ;
1563
+ let LayoutS { size, align, abi, fields, largest_niche, variants, repr_align } = self ;
1564
1564
f. debug_struct ( "Layout" )
1565
1565
. field ( "size" , size)
1566
1566
. field ( "align" , align)
1567
1567
. field ( "abi" , abi)
1568
1568
. field ( "fields" , fields)
1569
1569
. field ( "largest_niche" , largest_niche)
1570
1570
. field ( "variants" , variants)
1571
- . field ( "has_repr_align " , has_repr_align )
1571
+ . field ( "repr_align " , repr_align )
1572
1572
. finish ( )
1573
1573
}
1574
1574
}
@@ -1609,8 +1609,8 @@ impl<'a> Layout<'a> {
1609
1609
self . 0 . 0 . size
1610
1610
}
1611
1611
1612
- pub fn has_repr_align ( self ) -> bool {
1613
- self . 0 . 0 . has_repr_align
1612
+ pub fn repr_align ( self ) -> Option < Align > {
1613
+ self . 0 . 0 . repr_align
1614
1614
}
1615
1615
1616
1616
/// Whether the layout is from a type that implements [`std::marker::PointerLike`].
0 commit comments