1
Fork 0

Rollup merge of #82841 - hvdijk:x32, r=joshtriplett

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:
Mara Bos 2021-03-09 09:05:24 +00:00 committed by GitHub
commit bb9542b016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 39 additions and 39 deletions

View file

@ -32,7 +32,7 @@ pub enum Immediate<Tag = ()> {
ScalarPair(ScalarMaybeUninit<Tag>, ScalarMaybeUninit<Tag>),
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Immediate, 56);
impl<Tag> From<ScalarMaybeUninit<Tag>> for Immediate<Tag> {
@ -95,7 +95,7 @@ pub struct ImmTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
impl<Tag: Copy> std::fmt::Display for ImmTy<'tcx, Tag> {
@ -162,7 +162,7 @@ pub struct OpTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(OpTy<'_, ()>, 80);
impl<'tcx, Tag> std::ops::Deref for OpTy<'tcx, Tag> {

View file

@ -33,7 +33,7 @@ pub enum MemPlaceMeta<Tag = ()> {
Poison,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(MemPlaceMeta, 24);
impl<Tag> MemPlaceMeta<Tag> {
@ -74,7 +74,7 @@ pub struct MemPlace<Tag = ()> {
pub meta: MemPlaceMeta<Tag>,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(MemPlace, 56);
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable)]
@ -87,7 +87,7 @@ pub enum Place<Tag = ()> {
Local { frame: usize, local: mir::Local },
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Place, 64);
#[derive(Copy, Clone, Debug)]
@ -96,7 +96,7 @@ pub struct PlaceTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
impl<'tcx, Tag> std::ops::Deref for PlaceTy<'tcx, Tag> {
@ -114,7 +114,7 @@ pub struct MPlaceTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(MPlaceTy<'_>, 72);
impl<'tcx, Tag> std::ops::Deref for MPlaceTy<'tcx, Tag> {