diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-08-11 22:47:05 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-11 22:47:05 +0530 |
| commit | bc0f9e39f45f48b83d19c56221eac64f14cf23af (patch) | |
| tree | ad339bef443bc8d7b2f82c675c21478d7fbf8ed0 /compiler/rustc_const_eval/src/interpret | |
| parent | 1d0954570274a4264f78eeb284f6a130c4eb5bed (diff) | |
| parent | 0658e8cbcaa6f5d3952a0958ab7657fc8bba32d9 (diff) | |
| download | rust-bc0f9e39f45f48b83d19c56221eac64f14cf23af.tar.gz rust-bc0f9e39f45f48b83d19c56221eac64f14cf23af.zip | |
Rollup merge of #100391 - nnethercote:improve-size-assertions, r=lqd
Improve size assertions r? `@lqd`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index 94ba62c160c..fe80a55dfd2 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -823,9 +823,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] mod size_asserts { use super::*; + use rustc_data_structures::static_assert_size; // These are in alphabetical order, which is easy to maintain. - rustc_data_structures::static_assert_size!(Immediate, 56); - rustc_data_structures::static_assert_size!(ImmTy<'_>, 72); - rustc_data_structures::static_assert_size!(Operand, 64); - rustc_data_structures::static_assert_size!(OpTy<'_>, 88); + static_assert_size!(Immediate, 56); + static_assert_size!(ImmTy<'_>, 72); + static_assert_size!(Operand, 64); + static_assert_size!(OpTy<'_>, 88); } diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index f4571a1ca3d..97fe23cb5bc 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -891,10 +891,11 @@ where #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] mod size_asserts { use super::*; + use rustc_data_structures::static_assert_size; // These are in alphabetical order, which is easy to maintain. - rustc_data_structures::static_assert_size!(MemPlaceMeta, 24); - rustc_data_structures::static_assert_size!(MemPlace, 40); - rustc_data_structures::static_assert_size!(MPlaceTy<'_>, 64); - rustc_data_structures::static_assert_size!(Place, 48); - rustc_data_structures::static_assert_size!(PlaceTy<'_>, 72); + static_assert_size!(MemPlaceMeta, 24); + static_assert_size!(MemPlace, 40); + static_assert_size!(MPlaceTy<'_>, 64); + static_assert_size!(Place, 48); + static_assert_size!(PlaceTy<'_>, 72); } |
