Rollup merge of #120032 - Nadrieril:fix-rustc_abi, r=Nilstrieb

Fix `rustc_abi` build on stable

https://github.com/rust-lang/rust/pull/119446 broke the ability of `rustc_abi` to build on stable, which is required by rust-analyzer. This fixes it.
This commit is contained in:
Matthias Krüger 2024-01-17 20:21:22 +01:00 committed by GitHub
commit e0aa4df798
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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))]