Skip to content

Commit c25473f

Browse files
committed
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`
2 parents ecd4547 + 0d97669 commit c25473f

36 files changed

Lines changed: 45 additions & 43 deletions

File tree

‎compiler/rustc_ast/src/ast.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3367,7 +3367,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {
33673367
pubtypeForeignItem = Item<ForeignItemKind>;
33683368

33693369
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
3370-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
3370+
#[cfg(target_pointer_width = "64")]
33713371
mod size_asserts {
33723372
usesuper::*;
33733373
use rustc_data_structures::static_assert_size;

‎compiler/rustc_ast/src/token.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ where
10231023
}
10241024

10251025
// Some types are used a lot. Make sure they don't unintentionally get bigger.
1026-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
1026+
#[cfg(target_pointer_width = "64")]
10271027
mod size_asserts {
10281028
usesuper::*;
10291029
use rustc_data_structures::static_assert_size;

‎compiler/rustc_ast/src/tokenstream.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ impl DelimSpacing {
768768
}
769769

770770
// Some types are used a lot. Make sure they don't unintentionally get bigger.
771-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
771+
#[cfg(target_pointer_width = "64")]
772772
mod size_asserts {
773773
usesuper::*;
774774
use rustc_data_structures::static_assert_size;

‎compiler/rustc_const_eval/src/interpret/operand.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
792792
}
793793

794794
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
795-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
795+
#[cfg(target_pointer_width = "64")]
796796
mod size_asserts {
797797
usesuper::*;
798798
use rustc_data_structures::static_assert_size;

‎compiler/rustc_const_eval/src/interpret/place.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ where
10581058
}
10591059

10601060
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
1061-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
1061+
#[cfg(target_pointer_width = "64")]
10621062
mod size_asserts {
10631063
usesuper::*;
10641064
use rustc_data_structures::static_assert_size;

‎compiler/rustc_errors/src/lib.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ pub type PResult<'a, T> = Result<T, PErr<'a>>;
102102
rustc_fluent_macro::fluent_messages! {"../messages.ftl"}
103103

104104
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
105-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
105+
#[cfg(target_pointer_width = "64")]
106106
rustc_data_structures::static_assert_size!(PResult<'_,()>,16);
107-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
107+
#[cfg(target_pointer_width = "64")]
108108
rustc_data_structures::static_assert_size!(PResult<'_,bool>,16);
109109

110110
#[derive(Debug,PartialEq,Eq,Clone,Copy,Hash,Encodable,Decodable)]

‎compiler/rustc_expand/src/mbe/macro_parser.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ struct MatcherPos {
266266
}
267267

268268
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
269-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
269+
#[cfg(target_pointer_width = "64")]
270270
rustc_data_structures::static_assert_size!(MatcherPos,16);
271271

272272
implMatcherPos{

‎compiler/rustc_hir/src/hir.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,7 @@ impl<'hir> Node<'hir> {
37863786
}
37873787

37883788
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
3789-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
3789+
#[cfg(target_pointer_width = "64")]
37903790
mod size_asserts {
37913791
usesuper::*;
37923792
// tidy-alphabetical-start

‎compiler/rustc_index/src/bit_set.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ enum Chunk {
400400
}
401401

402402
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
403-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
403+
#[cfg(target_pointer_width = "64")]
404404
crate::static_assert_size!(Chunk,16);
405405

406406
impl<T>ChunkedBitSet<T>{

‎compiler/rustc_infer/src/infer/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ pub enum SubregionOrigin<'tcx> {
477477
}
478478

479479
// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
480-
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"),target_pointer_width = "64"))]
480+
#[cfg(target_pointer_width = "64")]
481481
static_assert_size!(SubregionOrigin<'_>,32);
482482

483483
impl<'tcx>SubregionOrigin<'tcx>{

0 commit comments

Comments
 (0)