We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 748d354 commit fba23d0Copy full SHA for fba23d0
src/librustc/ty/mod.rs
@@ -2059,9 +2059,10 @@ impl ReprOptions {
2059
}
2060
2061
/// Returns `true` if this `#[repr()]` should inhibit struct field reordering
2062
- /// optimizations, such as with repr(C) or repr(packed(1)).
+ /// optimizations, such as with repr(C), repr(packed(1)), or repr(<int>).
2063
pub fn inhibit_struct_field_reordering_opt(&self) -> bool {
2064
- !(self.flags & ReprFlags::IS_UNOPTIMISABLE).is_empty() || (self.pack == 1)
+ self.flags.intersects(ReprFlags::IS_UNOPTIMISABLE) || self.pack == 1 ||
2065
+ self.int.is_some()
2066
2067
2068
/// Returns true if this `#[repr()]` should inhibit union abi optimisations
0 commit comments