Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstrieb

Simplify `static_assert_size`s.

We want to run them on all 64-bit platforms.

r? `@ghost`
This commit is contained in:
bors 2024-04-18 09:47:45 +00:00
commit c25473ff62
36 changed files with 45 additions and 43 deletions

View file

@ -477,7 +477,7 @@ pub enum SubregionOrigin<'tcx> {
}
// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
#[cfg(target_pointer_width = "64")]
static_assert_size!(SubregionOrigin<'_>, 32);
impl<'tcx> SubregionOrigin<'tcx> {

View file

@ -32,7 +32,7 @@
#[macro_use]
extern crate rustc_macros;
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
#[cfg(target_pointer_width = "64")]
#[macro_use]
extern crate rustc_data_structures;
#[macro_use]

View file

@ -112,7 +112,7 @@ impl<'tcx> PolyTraitObligation<'tcx> {
}
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
#[cfg(target_pointer_width = "64")]
static_assert_size!(PredicateObligation<'_>, 48);
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;