Skip to content

Commit

Permalink
Rollup merge of rust-lang#120032 - Nadrieril:fix-rustc_abi, r=Nilstrieb
Browse files Browse the repository at this point in the history
Fix `rustc_abi` build on stable

rust-lang#119446 broke the ability of `rustc_abi` to build on stable, which is required by rust-analyzer. This fixes it.
  • Loading branch information
compiler-errors authored Jan 17, 2024
2 parents 7693297 + e12101c commit 7ae18f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down

0 comments on commit 7ae18f0

Please sign in to comment.