1
Fork 0

Change x64 size checks to not apply to x32.

Rust contains various size checks conditional on target_arch = "x86_64",
but these checks were never intended to apply to
x86_64-unknown-linux-gnux32. Add target_pointer_width = "64" to the
conditions.
This commit is contained in:
Harald van Dijk 2021-03-06 16:02:48 +00:00
parent 51748a8fc7
commit 95e096d623
No known key found for this signature in database
GPG key ID: 7D71BB318A5BD56D
23 changed files with 39 additions and 39 deletions

View file

@ -951,7 +951,7 @@ pub struct LocalDecl<'tcx> {
}
// `LocalDecl` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(LocalDecl<'_>, 56);
/// Extra information about a some locals that's used for diagnostics and for
@ -1468,7 +1468,7 @@ pub struct Statement<'tcx> {
}
// `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(Statement<'_>, 32);
impl Statement<'_> {
@ -1752,7 +1752,7 @@ impl<V, T> ProjectionElem<V, T> {
pub type PlaceElem<'tcx> = ProjectionElem<Local, Ty<'tcx>>;
// At least on 64 bit systems, `PlaceElem` should not be larger than two pointers.
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(PlaceElem<'_>, 24);
/// Alias for projections as they appear in `UserTypeProjection`, where we