diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2024-01-16 21:14:39 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2024-01-16 21:15:31 +0100 |
| commit | e12101c4db03b1cd35fcc288f8e6568f552ee51c (patch) | |
| tree | ca70c2519c707186b78d57353bb1707ae0f50ade | |
| parent | 714b29a17ff5fa727c794bbb60bfd335f8e75d42 (diff) | |
| download | rust-e12101c4db03b1cd35fcc288f8e6568f552ee51c.tar.gz rust-e12101c4db03b1cd35fcc288f8e6568f552ee51c.zip | |
Fix `rustc_abi` build on stable
| -rw-r--r-- | compiler/rustc_abi/src/lib.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index ea194e10def..c45a4a410f9 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -49,7 +49,14 @@ bitflags! { | 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)] #[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))] |
