Fix rustc_abi build on stable

This commit is contained in:
Nadrieril 2024-01-16 21:14:39 +01:00
parent 714b29a17f
commit e12101c4db

View File

@ -49,7 +49,14 @@ impl ReprFlags: u8 {
| ReprFlags::IS_LINEAR.bits(); | ReprFlags::IS_LINEAR.bits();
} }
} }
rustc_data_structures::external_bitflags_debug! { ReprFlags }
// This is the same as `rustc_data_structures::external_bitflags_debug` but without the
// `rustc_data_structures` to make it build on stable.
impl std::fmt::Debug for ReprFlags {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
bitflags::parser::to_writer(self, f)
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))] #[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]