@@ -1532,10 +1532,10 @@ pub struct LayoutS {
15321532 pub align : AbiAndPrefAlign ,
15331533 pub size : Size ,
15341534
1535- /// True if the alignment was explicitly requested with `repr(align)`.
1535+ /// The alignment explicitly requested with `repr(align)`.
15361536 /// 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 > ,
15391539}
15401540
15411541impl LayoutS {
@@ -1550,7 +1550,7 @@ impl LayoutS {
15501550 largest_niche,
15511551 size,
15521552 align,
1553- has_repr_align : false ,
1553+ repr_align : None ,
15541554 }
15551555 }
15561556}
@@ -1560,15 +1560,15 @@ impl fmt::Debug for LayoutS {
15601560 // This is how `Layout` used to print before it become
15611561 // `Interned<LayoutS>`. We print it like this to avoid having to update
15621562 // 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 ;
15641564 f. debug_struct ( "Layout" )
15651565 . field ( "size" , size)
15661566 . field ( "align" , align)
15671567 . field ( "abi" , abi)
15681568 . field ( "fields" , fields)
15691569 . field ( "largest_niche" , largest_niche)
15701570 . field ( "variants" , variants)
1571- . field ( "has_repr_align " , has_repr_align )
1571+ . field ( "repr_align " , repr_align )
15721572 . finish ( )
15731573 }
15741574}
@@ -1609,8 +1609,8 @@ impl<'a> Layout<'a> {
16091609 self . 0 . 0 . size
16101610 }
16111611
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
16141614 }
16151615
16161616 /// Whether the layout is from a type that implements [`std::marker::PointerLike`].
0 commit comments