Skip to content

Commit 7ae18f0

Browse files
Rollup merge of #120032 - Nadrieril:fix-rustc_abi, r=Nilstrieb
Fix `rustc_abi` build on stable #119446 broke the ability of `rustc_abi` to build on stable, which is required by rust-analyzer. This fixes it.
2 parents 7693297 + e12101c commit 7ae18f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/rustc_abi/src/lib.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ bitflags! {
4949
| ReprFlags::IS_LINEAR.bits();
5050
}
5151
}
52-
rustc_data_structures::external_bitflags_debug! { ReprFlags }
52+
53+
// This is the same as `rustc_data_structures::external_bitflags_debug` but without the
54+
// `rustc_data_structures` to make it build on stable.
55+
impl std::fmt::Debug for ReprFlags {
56+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
57+
bitflags::parser::to_writer(self, f)
58+
}
59+
}
5360

5461
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
5562
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]

0 commit comments

Comments
 (0)