Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5ab80de

Browse files
committedDec 23, 2024
adjust UI tests
# Conflicts: # tests/ui/type/pattern_types/range_patterns.stderr
1 parent a7348f9 commit 5ab80de

31 files changed

+239
-64
lines changed
 

‎tests/ui/abi/c-zst.aarch64-darwin.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Ignore,
@@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
4950
},
5051
max_repr_align: None,
5152
unadjusted_abi_align: $SOME_ALIGN,
53+
randomization_seed: 0,
5254
},
5355
},
5456
mode: Ignore,

‎tests/ui/abi/c-zst.powerpc-linux.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Indirect {
@@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: $SOME_ALIGN,
64+
randomization_seed: 0,
6365
},
6466
},
6567
mode: Ignore,

‎tests/ui/abi/c-zst.s390x-linux.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Indirect {
@@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: $SOME_ALIGN,
64+
randomization_seed: 0,
6365
},
6466
},
6567
mode: Ignore,

‎tests/ui/abi/c-zst.sparc64-linux.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Indirect {
@@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: $SOME_ALIGN,
64+
randomization_seed: 0,
6365
},
6466
},
6567
mode: Ignore,

‎tests/ui/abi/c-zst.x86_64-linux.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Ignore,
@@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
4950
},
5051
max_repr_align: None,
5152
unadjusted_abi_align: $SOME_ALIGN,
53+
randomization_seed: 0,
5254
},
5355
},
5456
mode: Ignore,

‎tests/ui/abi/c-zst.x86_64-pc-windows-gnu.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Indirect {
@@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: $SOME_ALIGN,
64+
randomization_seed: 0,
6365
},
6466
},
6567
mode: Ignore,

‎tests/ui/abi/debug.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
2+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
23
//@ normalize-stderr-test: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE"
34
//@ normalize-stderr-test: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL"
45
//@ normalize-stderr-test: "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL"

‎tests/ui/abi/debug.stderr

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ error: fn_abi_of(test) = FnAbi {
2525
},
2626
max_repr_align: None,
2727
unadjusted_abi_align: $SOME_ALIGN,
28+
randomization_seed: $SEED,
2829
},
2930
},
3031
mode: Direct(
@@ -71,6 +72,7 @@ error: fn_abi_of(test) = FnAbi {
7172
},
7273
max_repr_align: None,
7374
unadjusted_abi_align: $SOME_ALIGN,
75+
randomization_seed: $SEED,
7476
},
7577
},
7678
mode: Direct(
@@ -87,7 +89,7 @@ error: fn_abi_of(test) = FnAbi {
8789
conv: Rust,
8890
can_unwind: $SOME_BOOL,
8991
}
90-
--> $DIR/debug.rs:15:1
92+
--> $DIR/debug.rs:16:1
9193
|
9294
LL | fn test(_x: u8) -> bool { true }
9395
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,6 +130,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
128130
},
129131
max_repr_align: None,
130132
unadjusted_abi_align: $SOME_ALIGN,
133+
randomization_seed: $SEED,
131134
},
132135
},
133136
mode: Direct(
@@ -165,6 +168,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
165168
},
166169
max_repr_align: None,
167170
unadjusted_abi_align: $SOME_ALIGN,
171+
randomization_seed: $SEED,
168172
},
169173
},
170174
mode: Direct(
@@ -181,7 +185,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
181185
conv: Rust,
182186
can_unwind: $SOME_BOOL,
183187
}
184-
--> $DIR/debug.rs:18:1
188+
--> $DIR/debug.rs:19:1
185189
|
186190
LL | type TestFnPtr = fn(bool) -> u8;
187191
| ^^^^^^^^^^^^^^
@@ -214,6 +218,7 @@ error: fn_abi_of(test_generic) = FnAbi {
214218
},
215219
max_repr_align: None,
216220
unadjusted_abi_align: $SOME_ALIGN,
221+
randomization_seed: $SEED,
217222
},
218223
},
219224
mode: Direct(
@@ -248,6 +253,7 @@ error: fn_abi_of(test_generic) = FnAbi {
248253
},
249254
max_repr_align: None,
250255
unadjusted_abi_align: $SOME_ALIGN,
256+
randomization_seed: $SEED,
251257
},
252258
},
253259
mode: Ignore,
@@ -257,13 +263,13 @@ error: fn_abi_of(test_generic) = FnAbi {
257263
conv: Rust,
258264
can_unwind: $SOME_BOOL,
259265
}
260-
--> $DIR/debug.rs:21:1
266+
--> $DIR/debug.rs:22:1
261267
|
262268
LL | fn test_generic<T>(_x: *const T) { }
263269
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264270

265271
error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
266-
--> $DIR/debug.rs:24:1
272+
--> $DIR/debug.rs:25:1
267273
|
268274
LL | const C: () = ();
269275
| ^^^^^^^^^^^
@@ -296,6 +302,7 @@ error: ABIs are not compatible
296302
},
297303
max_repr_align: None,
298304
unadjusted_abi_align: $SOME_ALIGN,
305+
randomization_seed: $SEED,
299306
},
300307
},
301308
mode: Direct(
@@ -330,6 +337,7 @@ error: ABIs are not compatible
330337
},
331338
max_repr_align: None,
332339
unadjusted_abi_align: $SOME_ALIGN,
340+
randomization_seed: $SEED,
333341
},
334342
},
335343
mode: Ignore,
@@ -366,6 +374,7 @@ error: ABIs are not compatible
366374
},
367375
max_repr_align: None,
368376
unadjusted_abi_align: $SOME_ALIGN,
377+
randomization_seed: $SEED,
369378
},
370379
},
371380
mode: Direct(
@@ -400,6 +409,7 @@ error: ABIs are not compatible
400409
},
401410
max_repr_align: None,
402411
unadjusted_abi_align: $SOME_ALIGN,
412+
randomization_seed: $SEED,
403413
},
404414
},
405415
mode: Ignore,
@@ -409,7 +419,7 @@ error: ABIs are not compatible
409419
conv: Rust,
410420
can_unwind: $SOME_BOOL,
411421
}
412-
--> $DIR/debug.rs:40:1
422+
--> $DIR/debug.rs:41:1
413423
|
414424
LL | type TestAbiNe = (fn(u8), fn(u32));
415425
| ^^^^^^^^^^^^^^
@@ -439,6 +449,7 @@ error: ABIs are not compatible
439449
},
440450
max_repr_align: None,
441451
unadjusted_abi_align: $SOME_ALIGN,
452+
randomization_seed: $SEED,
442453
},
443454
},
444455
mode: Indirect {
@@ -477,6 +488,7 @@ error: ABIs are not compatible
477488
},
478489
max_repr_align: None,
479490
unadjusted_abi_align: $SOME_ALIGN,
491+
randomization_seed: $SEED,
480492
},
481493
},
482494
mode: Ignore,
@@ -510,6 +522,7 @@ error: ABIs are not compatible
510522
},
511523
max_repr_align: None,
512524
unadjusted_abi_align: $SOME_ALIGN,
525+
randomization_seed: $SEED,
513526
},
514527
},
515528
mode: Indirect {
@@ -548,6 +561,7 @@ error: ABIs are not compatible
548561
},
549562
max_repr_align: None,
550563
unadjusted_abi_align: $SOME_ALIGN,
564+
randomization_seed: $SEED,
551565
},
552566
},
553567
mode: Ignore,
@@ -557,7 +571,7 @@ error: ABIs are not compatible
557571
conv: Rust,
558572
can_unwind: $SOME_BOOL,
559573
}
560-
--> $DIR/debug.rs:43:1
574+
--> $DIR/debug.rs:44:1
561575
|
562576
LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32]));
563577
| ^^^^^^^^^^^^^^^^^^^^
@@ -589,6 +603,7 @@ error: ABIs are not compatible
589603
},
590604
max_repr_align: None,
591605
unadjusted_abi_align: $SOME_ALIGN,
606+
randomization_seed: $SEED,
592607
},
593608
},
594609
mode: Direct(
@@ -623,6 +638,7 @@ error: ABIs are not compatible
623638
},
624639
max_repr_align: None,
625640
unadjusted_abi_align: $SOME_ALIGN,
641+
randomization_seed: $SEED,
626642
},
627643
},
628644
mode: Ignore,
@@ -659,6 +675,7 @@ error: ABIs are not compatible
659675
},
660676
max_repr_align: None,
661677
unadjusted_abi_align: $SOME_ALIGN,
678+
randomization_seed: $SEED,
662679
},
663680
},
664681
mode: Direct(
@@ -693,6 +710,7 @@ error: ABIs are not compatible
693710
},
694711
max_repr_align: None,
695712
unadjusted_abi_align: $SOME_ALIGN,
713+
randomization_seed: $SEED,
696714
},
697715
},
698716
mode: Ignore,
@@ -702,7 +720,7 @@ error: ABIs are not compatible
702720
conv: Rust,
703721
can_unwind: $SOME_BOOL,
704722
}
705-
--> $DIR/debug.rs:46:1
723+
--> $DIR/debug.rs:47:1
706724
|
707725
LL | type TestAbiNeFloat = (fn(f32), fn(u32));
708726
| ^^^^^^^^^^^^^^^^^^^
@@ -735,6 +753,7 @@ error: ABIs are not compatible
735753
},
736754
max_repr_align: None,
737755
unadjusted_abi_align: $SOME_ALIGN,
756+
randomization_seed: $SEED,
738757
},
739758
},
740759
mode: Direct(
@@ -769,6 +788,7 @@ error: ABIs are not compatible
769788
},
770789
max_repr_align: None,
771790
unadjusted_abi_align: $SOME_ALIGN,
791+
randomization_seed: $SEED,
772792
},
773793
},
774794
mode: Ignore,
@@ -805,6 +825,7 @@ error: ABIs are not compatible
805825
},
806826
max_repr_align: None,
807827
unadjusted_abi_align: $SOME_ALIGN,
828+
randomization_seed: $SEED,
808829
},
809830
},
810831
mode: Direct(
@@ -839,6 +860,7 @@ error: ABIs are not compatible
839860
},
840861
max_repr_align: None,
841862
unadjusted_abi_align: $SOME_ALIGN,
863+
randomization_seed: $SEED,
842864
},
843865
},
844866
mode: Ignore,
@@ -848,13 +870,13 @@ error: ABIs are not compatible
848870
conv: Rust,
849871
can_unwind: $SOME_BOOL,
850872
}
851-
--> $DIR/debug.rs:50:1
873+
--> $DIR/debug.rs:51:1
852874
|
853875
LL | type TestAbiNeSign = (fn(i32), fn(u32));
854876
| ^^^^^^^^^^^^^^^^^^
855877

856878
error[E0277]: the size for values of type `str` cannot be known at compilation time
857-
--> $DIR/debug.rs:53:46
879+
--> $DIR/debug.rs:54:46
858880
|
859881
LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str)));
860882
| ^^^^^^^^^^ doesn't have a size known at compile-time
@@ -863,7 +885,7 @@ LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str)));
863885
= note: only the last element of a tuple may have a dynamically sized type
864886

865887
error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
866-
--> $DIR/debug.rs:28:5
888+
--> $DIR/debug.rs:29:5
867889
|
868890
LL | const C: () = ();
869891
| ^^^^^^^^^^^
@@ -906,6 +928,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
906928
},
907929
max_repr_align: None,
908930
unadjusted_abi_align: $SOME_ALIGN,
931+
randomization_seed: $SEED,
909932
},
910933
},
911934
mode: Direct(
@@ -942,6 +965,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
942965
},
943966
max_repr_align: None,
944967
unadjusted_abi_align: $SOME_ALIGN,
968+
randomization_seed: $SEED,
945969
},
946970
},
947971
mode: Ignore,
@@ -951,7 +975,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
951975
conv: Rust,
952976
can_unwind: $SOME_BOOL,
953977
}
954-
--> $DIR/debug.rs:33:5
978+
--> $DIR/debug.rs:34:5
955979
|
956980
LL | fn assoc_test(&self) { }
957981
| ^^^^^^^^^^^^^^^^^^^^

‎tests/ui/abi/sysv64-zst.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Ignore,
@@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
4950
},
5051
max_repr_align: None,
5152
unadjusted_abi_align: $SOME_ALIGN,
53+
randomization_seed: 0,
5254
},
5355
},
5456
mode: Ignore,

‎tests/ui/abi/win64-zst.x86_64-linux.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Ignore,
@@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
4950
},
5051
max_repr_align: None,
5152
unadjusted_abi_align: $SOME_ALIGN,
53+
randomization_seed: 0,
5254
},
5355
},
5456
mode: Ignore,

‎tests/ui/abi/win64-zst.x86_64-windows-gnu.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Indirect {
@@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: $SOME_ALIGN,
64+
randomization_seed: 0,
6365
},
6466
},
6567
mode: Ignore,

‎tests/ui/abi/win64-zst.x86_64-windows-msvc.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
2222
},
2323
max_repr_align: None,
2424
unadjusted_abi_align: $SOME_ALIGN,
25+
randomization_seed: 0,
2526
},
2627
},
2728
mode: Ignore,
@@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
4950
},
5051
max_repr_align: None,
5152
unadjusted_abi_align: $SOME_ALIGN,
53+
randomization_seed: 0,
5254
},
5355
},
5456
mode: Ignore,

‎tests/ui/layout/debug.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
2+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
23
#![feature(never_type, rustc_attrs, type_alias_impl_trait, repr_simd)]
34
#![crate_type = "lib"]
45

‎tests/ui/layout/debug.stderr

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unions cannot have zero fields
2-
--> $DIR/debug.rs:82:1
2+
--> $DIR/debug.rs:83:1
33
|
44
LL | union EmptyUnion {}
55
| ^^^^^^^^^^^^^^^^^^^
@@ -61,6 +61,7 @@ error: layout_of(E) = Layout {
6161
},
6262
max_repr_align: None,
6363
unadjusted_abi_align: Align(1 bytes),
64+
randomization_seed: $SEED,
6465
},
6566
Layout {
6667
size: Size(12 bytes),
@@ -87,13 +88,15 @@ error: layout_of(E) = Layout {
8788
},
8889
max_repr_align: None,
8990
unadjusted_abi_align: Align(4 bytes),
91+
randomization_seed: $SEED,
9092
},
9193
],
9294
},
9395
max_repr_align: None,
9496
unadjusted_abi_align: Align(4 bytes),
97+
randomization_seed: $SEED,
9598
}
96-
--> $DIR/debug.rs:7:1
99+
--> $DIR/debug.rs:8:1
97100
|
98101
LL | enum E { Foo, Bar(!, i32, i32) }
99102
| ^^^^^^
@@ -138,8 +141,9 @@ error: layout_of(S) = Layout {
138141
},
139142
max_repr_align: None,
140143
unadjusted_abi_align: Align(4 bytes),
144+
randomization_seed: $SEED,
141145
}
142-
--> $DIR/debug.rs:10:1
146+
--> $DIR/debug.rs:11:1
143147
|
144148
LL | struct S { f1: i32, f2: (), f3: i32 }
145149
| ^^^^^^^^
@@ -162,8 +166,9 @@ error: layout_of(U) = Layout {
162166
},
163167
max_repr_align: None,
164168
unadjusted_abi_align: Align(4 bytes),
169+
randomization_seed: $SEED,
165170
}
166-
--> $DIR/debug.rs:13:1
171+
--> $DIR/debug.rs:14:1
167172
|
168173
LL | union U { f1: (i32, i32), f3: i32 }
169174
| ^^^^^^^
@@ -255,6 +260,7 @@ error: layout_of(Result<i32, i32>) = Layout {
255260
},
256261
max_repr_align: None,
257262
unadjusted_abi_align: Align(4 bytes),
263+
randomization_seed: $SEED,
258264
},
259265
Layout {
260266
size: Size(8 bytes),
@@ -292,13 +298,15 @@ error: layout_of(Result<i32, i32>) = Layout {
292298
},
293299
max_repr_align: None,
294300
unadjusted_abi_align: Align(4 bytes),
301+
randomization_seed: $SEED,
295302
},
296303
],
297304
},
298305
max_repr_align: None,
299306
unadjusted_abi_align: Align(4 bytes),
307+
randomization_seed: $SEED,
300308
}
301-
--> $DIR/debug.rs:16:1
309+
--> $DIR/debug.rs:17:1
302310
|
303311
LL | type Test = Result<i32, i32>;
304312
| ^^^^^^^^^
@@ -325,8 +333,9 @@ error: layout_of(i32) = Layout {
325333
},
326334
max_repr_align: None,
327335
unadjusted_abi_align: Align(4 bytes),
336+
randomization_seed: $SEED,
328337
}
329-
--> $DIR/debug.rs:19:1
338+
--> $DIR/debug.rs:20:1
330339
|
331340
LL | type T = impl std::fmt::Debug;
332341
| ^^^^^^
@@ -349,8 +358,9 @@ error: layout_of(V) = Layout {
349358
},
350359
max_repr_align: None,
351360
unadjusted_abi_align: Align(2 bytes),
361+
randomization_seed: $SEED,
352362
}
353-
--> $DIR/debug.rs:25:1
363+
--> $DIR/debug.rs:26:1
354364
|
355365
LL | pub union V {
356366
| ^^^^^^^^^^^
@@ -373,8 +383,9 @@ error: layout_of(W) = Layout {
373383
},
374384
max_repr_align: None,
375385
unadjusted_abi_align: Align(2 bytes),
386+
randomization_seed: $SEED,
376387
}
377-
--> $DIR/debug.rs:31:1
388+
--> $DIR/debug.rs:32:1
378389
|
379390
LL | pub union W {
380391
| ^^^^^^^^^^^
@@ -397,8 +408,9 @@ error: layout_of(Y) = Layout {
397408
},
398409
max_repr_align: None,
399410
unadjusted_abi_align: Align(2 bytes),
411+
randomization_seed: $SEED,
400412
}
401-
--> $DIR/debug.rs:37:1
413+
--> $DIR/debug.rs:38:1
402414
|
403415
LL | pub union Y {
404416
| ^^^^^^^^^^^
@@ -421,8 +433,9 @@ error: layout_of(P1) = Layout {
421433
},
422434
max_repr_align: None,
423435
unadjusted_abi_align: Align(1 bytes),
436+
randomization_seed: $SEED,
424437
}
425-
--> $DIR/debug.rs:44:1
438+
--> $DIR/debug.rs:45:1
426439
|
427440
LL | union P1 { x: u32 }
428441
| ^^^^^^^^
@@ -445,8 +458,9 @@ error: layout_of(P2) = Layout {
445458
},
446459
max_repr_align: None,
447460
unadjusted_abi_align: Align(1 bytes),
461+
randomization_seed: $SEED,
448462
}
449-
--> $DIR/debug.rs:48:1
463+
--> $DIR/debug.rs:49:1
450464
|
451465
LL | union P2 { x: (u32, u32) }
452466
| ^^^^^^^^
@@ -469,8 +483,9 @@ error: layout_of(P3) = Layout {
469483
},
470484
max_repr_align: None,
471485
unadjusted_abi_align: Align(1 bytes),
486+
randomization_seed: $SEED,
472487
}
473-
--> $DIR/debug.rs:56:1
488+
--> $DIR/debug.rs:57:1
474489
|
475490
LL | union P3 { x: F32x4 }
476491
| ^^^^^^^^
@@ -493,8 +508,9 @@ error: layout_of(P4) = Layout {
493508
},
494509
max_repr_align: None,
495510
unadjusted_abi_align: Align(1 bytes),
511+
randomization_seed: $SEED,
496512
}
497-
--> $DIR/debug.rs:60:1
513+
--> $DIR/debug.rs:61:1
498514
|
499515
LL | union P4 { x: E }
500516
| ^^^^^^^^
@@ -522,8 +538,9 @@ error: layout_of(P5) = Layout {
522538
},
523539
max_repr_align: None,
524540
unadjusted_abi_align: Align(1 bytes),
541+
randomization_seed: $SEED,
525542
}
526-
--> $DIR/debug.rs:64:1
543+
--> $DIR/debug.rs:65:1
527544
|
528545
LL | union P5 { zst: [u16; 0], byte: u8 }
529546
| ^^^^^^^^
@@ -551,20 +568,21 @@ error: layout_of(MaybeUninit<u8>) = Layout {
551568
},
552569
max_repr_align: None,
553570
unadjusted_abi_align: Align(1 bytes),
571+
randomization_seed: $SEED,
554572
}
555-
--> $DIR/debug.rs:67:1
573+
--> $DIR/debug.rs:68:1
556574
|
557575
LL | type X = std::mem::MaybeUninit<u8>;
558576
| ^^^^^^
559577

560578
error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases
561-
--> $DIR/debug.rs:70:1
579+
--> $DIR/debug.rs:71:1
562580
|
563581
LL | const C: () = ();
564582
| ^^^^^^^^^^^
565583

566584
error[E0277]: the size for values of type `str` cannot be known at compilation time
567-
--> $DIR/debug.rs:78:19
585+
--> $DIR/debug.rs:79:19
568586
|
569587
LL | type Impossible = (str, str);
570588
| ^^^^^^^^^^ doesn't have a size known at compile-time
@@ -573,13 +591,13 @@ LL | type Impossible = (str, str);
573591
= note: only the last element of a tuple may have a dynamically sized type
574592

575593
error: the type `EmptyUnion` has an unknown layout
576-
--> $DIR/debug.rs:82:1
594+
--> $DIR/debug.rs:83:1
577595
|
578596
LL | union EmptyUnion {}
579597
| ^^^^^^^^^^^^^^^^
580598

581599
error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases
582-
--> $DIR/debug.rs:74:5
600+
--> $DIR/debug.rs:75:5
583601
|
584602
LL | const C: () = ();
585603
| ^^^^^^^^^^^

‎tests/ui/layout/hexagon-enum.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ compile-flags: --target hexagon-unknown-linux-musl
2+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
23
//@ needs-llvm-components: hexagon
34
//
45
// Verify that the hexagon targets implement the repr(C) for enums correctly.

‎tests/ui/layout/hexagon-enum.stderr

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ error: layout_of(A) = Layout {
6161
},
6262
max_repr_align: None,
6363
unadjusted_abi_align: Align(1 bytes),
64+
randomization_seed: $SEED,
6465
},
6566
],
6667
},
6768
max_repr_align: None,
6869
unadjusted_abi_align: Align(1 bytes),
70+
randomization_seed: $SEED,
6971
}
70-
--> $DIR/hexagon-enum.rs:16:1
72+
--> $DIR/hexagon-enum.rs:17:1
7173
|
7274
LL | enum A { Apple }
7375
| ^^^^^^
@@ -135,13 +137,15 @@ error: layout_of(B) = Layout {
135137
},
136138
max_repr_align: None,
137139
unadjusted_abi_align: Align(1 bytes),
140+
randomization_seed: $SEED,
138141
},
139142
],
140143
},
141144
max_repr_align: None,
142145
unadjusted_abi_align: Align(1 bytes),
146+
randomization_seed: $SEED,
143147
}
144-
--> $DIR/hexagon-enum.rs:20:1
148+
--> $DIR/hexagon-enum.rs:21:1
145149
|
146150
LL | enum B { Banana = 255, }
147151
| ^^^^^^
@@ -209,13 +213,15 @@ error: layout_of(C) = Layout {
209213
},
210214
max_repr_align: None,
211215
unadjusted_abi_align: Align(2 bytes),
216+
randomization_seed: $SEED,
212217
},
213218
],
214219
},
215220
max_repr_align: None,
216221
unadjusted_abi_align: Align(2 bytes),
222+
randomization_seed: $SEED,
217223
}
218-
--> $DIR/hexagon-enum.rs:24:1
224+
--> $DIR/hexagon-enum.rs:25:1
219225
|
220226
LL | enum C { Chaenomeles = 256, }
221227
| ^^^^^^
@@ -283,13 +289,15 @@ error: layout_of(P) = Layout {
283289
},
284290
max_repr_align: None,
285291
unadjusted_abi_align: Align(4 bytes),
292+
randomization_seed: $SEED,
286293
},
287294
],
288295
},
289296
max_repr_align: None,
290297
unadjusted_abi_align: Align(4 bytes),
298+
randomization_seed: $SEED,
291299
}
292-
--> $DIR/hexagon-enum.rs:28:1
300+
--> $DIR/hexagon-enum.rs:29:1
293301
|
294302
LL | enum P { Peach = 0x1000_0000isize, }
295303
| ^^^^^^
@@ -357,13 +365,15 @@ error: layout_of(T) = Layout {
357365
},
358366
max_repr_align: None,
359367
unadjusted_abi_align: Align(4 bytes),
368+
randomization_seed: $SEED,
360369
},
361370
],
362371
},
363372
max_repr_align: None,
364373
unadjusted_abi_align: Align(4 bytes),
374+
randomization_seed: $SEED,
365375
}
366-
--> $DIR/hexagon-enum.rs:34:1
376+
--> $DIR/hexagon-enum.rs:35:1
367377
|
368378
LL | enum T { Tangerine = TANGERINE as isize }
369379
| ^^^^^^

‎tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
2+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
23
#![crate_type = "lib"]
34
#![feature(rustc_attrs)]
45

‎tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ error: layout_of(MissingPayloadField) = Layout {
8383
},
8484
max_repr_align: None,
8585
unadjusted_abi_align: Align(1 bytes),
86+
randomization_seed: $SEED,
8687
},
8788
Layout {
8889
size: Size(1 bytes),
@@ -103,13 +104,15 @@ error: layout_of(MissingPayloadField) = Layout {
103104
},
104105
max_repr_align: None,
105106
unadjusted_abi_align: Align(1 bytes),
107+
randomization_seed: $SEED,
106108
},
107109
],
108110
},
109111
max_repr_align: None,
110112
unadjusted_abi_align: Align(1 bytes),
113+
randomization_seed: $SEED,
111114
}
112-
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:16:1
115+
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:17:1
113116
|
114117
LL | pub enum MissingPayloadField {
115118
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -201,6 +204,7 @@ error: layout_of(CommonPayloadField) = Layout {
201204
},
202205
max_repr_align: None,
203206
unadjusted_abi_align: Align(1 bytes),
207+
randomization_seed: $SEED,
204208
},
205209
Layout {
206210
size: Size(2 bytes),
@@ -238,13 +242,15 @@ error: layout_of(CommonPayloadField) = Layout {
238242
},
239243
max_repr_align: None,
240244
unadjusted_abi_align: Align(1 bytes),
245+
randomization_seed: $SEED,
241246
},
242247
],
243248
},
244249
max_repr_align: None,
245250
unadjusted_abi_align: Align(1 bytes),
251+
randomization_seed: $SEED,
246252
}
247-
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:25:1
253+
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:26:1
248254
|
249255
LL | pub enum CommonPayloadField {
250256
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -334,6 +340,7 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
334340
},
335341
max_repr_align: None,
336342
unadjusted_abi_align: Align(1 bytes),
343+
randomization_seed: $SEED,
337344
},
338345
Layout {
339346
size: Size(2 bytes),
@@ -370,13 +377,15 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
370377
},
371378
max_repr_align: None,
372379
unadjusted_abi_align: Align(1 bytes),
380+
randomization_seed: $SEED,
373381
},
374382
],
375383
},
376384
max_repr_align: None,
377385
unadjusted_abi_align: Align(1 bytes),
386+
randomization_seed: $SEED,
378387
}
379-
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:33:1
388+
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:34:1
380389
|
381390
LL | pub enum CommonPayloadFieldIsMaybeUninit {
382391
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -482,6 +491,7 @@ error: layout_of(NicheFirst) = Layout {
482491
},
483492
max_repr_align: None,
484493
unadjusted_abi_align: Align(1 bytes),
494+
randomization_seed: $SEED,
485495
},
486496
Layout {
487497
size: Size(0 bytes),
@@ -502,6 +512,7 @@ error: layout_of(NicheFirst) = Layout {
502512
},
503513
max_repr_align: None,
504514
unadjusted_abi_align: Align(1 bytes),
515+
randomization_seed: $SEED,
505516
},
506517
Layout {
507518
size: Size(0 bytes),
@@ -522,13 +533,15 @@ error: layout_of(NicheFirst) = Layout {
522533
},
523534
max_repr_align: None,
524535
unadjusted_abi_align: Align(1 bytes),
536+
randomization_seed: $SEED,
525537
},
526538
],
527539
},
528540
max_repr_align: None,
529541
unadjusted_abi_align: Align(1 bytes),
542+
randomization_seed: $SEED,
530543
}
531-
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:41:1
544+
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:42:1
532545
|
533546
LL | pub enum NicheFirst {
534547
| ^^^^^^^^^^^^^^^^^^^
@@ -634,6 +647,7 @@ error: layout_of(NicheSecond) = Layout {
634647
},
635648
max_repr_align: None,
636649
unadjusted_abi_align: Align(1 bytes),
650+
randomization_seed: $SEED,
637651
},
638652
Layout {
639653
size: Size(0 bytes),
@@ -654,6 +668,7 @@ error: layout_of(NicheSecond) = Layout {
654668
},
655669
max_repr_align: None,
656670
unadjusted_abi_align: Align(1 bytes),
671+
randomization_seed: $SEED,
657672
},
658673
Layout {
659674
size: Size(0 bytes),
@@ -674,13 +689,15 @@ error: layout_of(NicheSecond) = Layout {
674689
},
675690
max_repr_align: None,
676691
unadjusted_abi_align: Align(1 bytes),
692+
randomization_seed: $SEED,
677693
},
678694
],
679695
},
680696
max_repr_align: None,
681697
unadjusted_abi_align: Align(1 bytes),
698+
randomization_seed: $SEED,
682699
}
683-
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:50:1
700+
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:51:1
684701
|
685702
LL | pub enum NicheSecond {
686703
| ^^^^^^^^^^^^^^^^^^^^

‎tests/ui/layout/issue-96185-overaligned-enum.stderr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ error: layout_of(Aligned1) = Layout {
5757
Align(8 bytes),
5858
),
5959
unadjusted_abi_align: Align(1 bytes),
60+
randomization_seed: 17460063985324092396,
6061
},
6162
Layout {
6263
size: Size(8 bytes),
@@ -79,13 +80,15 @@ error: layout_of(Aligned1) = Layout {
7980
Align(8 bytes),
8081
),
8182
unadjusted_abi_align: Align(1 bytes),
83+
randomization_seed: 17460063985324092396,
8284
},
8385
],
8486
},
8587
max_repr_align: Some(
8688
Align(8 bytes),
8789
),
8890
unadjusted_abi_align: Align(1 bytes),
91+
randomization_seed: 15486703808553173956,
8992
}
9093
--> $DIR/issue-96185-overaligned-enum.rs:8:1
9194
|
@@ -157,6 +160,7 @@ error: layout_of(Aligned2) = Layout {
157160
Align(1 bytes),
158161
),
159162
unadjusted_abi_align: Align(1 bytes),
163+
randomization_seed: 11209662987228166502,
160164
},
161165
Layout {
162166
size: Size(1 bytes),
@@ -179,13 +183,15 @@ error: layout_of(Aligned2) = Layout {
179183
Align(1 bytes),
180184
),
181185
unadjusted_abi_align: Align(1 bytes),
186+
randomization_seed: 11209662987228166502,
182187
},
183188
],
184189
},
185190
max_repr_align: Some(
186191
Align(1 bytes),
187192
),
188193
unadjusted_abi_align: Align(1 bytes),
194+
randomization_seed: 15182244887974947890,
189195
}
190196
--> $DIR/issue-96185-overaligned-enum.rs:16:1
191197
|

‎tests/ui/layout/thumb-enum.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ error: layout_of(A) = Layout {
6161
},
6262
max_repr_align: None,
6363
unadjusted_abi_align: Align(1 bytes),
64+
randomization_seed: 9448164466094582721,
6465
},
6566
],
6667
},
6768
max_repr_align: None,
6869
unadjusted_abi_align: Align(1 bytes),
70+
randomization_seed: 449584858479613826,
6971
}
7072
--> $DIR/thumb-enum.rs:16:1
7173
|
@@ -135,11 +137,13 @@ error: layout_of(B) = Layout {
135137
},
136138
max_repr_align: None,
137139
unadjusted_abi_align: Align(1 bytes),
140+
randomization_seed: 5303142581069593230,
138141
},
139142
],
140143
},
141144
max_repr_align: None,
142145
unadjusted_abi_align: Align(1 bytes),
146+
randomization_seed: 10606285162139186460,
143147
}
144148
--> $DIR/thumb-enum.rs:20:1
145149
|
@@ -209,11 +213,13 @@ error: layout_of(C) = Layout {
209213
},
210214
max_repr_align: None,
211215
unadjusted_abi_align: Align(2 bytes),
216+
randomization_seed: 18212871818349130469,
212217
},
213218
],
214219
},
215220
max_repr_align: None,
216221
unadjusted_abi_align: Align(2 bytes),
222+
randomization_seed: 17978999562988709322,
217223
}
218224
--> $DIR/thumb-enum.rs:24:1
219225
|
@@ -283,11 +289,13 @@ error: layout_of(P) = Layout {
283289
},
284290
max_repr_align: None,
285291
unadjusted_abi_align: Align(4 bytes),
292+
randomization_seed: 10246698434482586249,
286293
},
287294
],
288295
},
289296
max_repr_align: None,
290297
unadjusted_abi_align: Align(4 bytes),
298+
randomization_seed: 2046652795255620882,
291299
}
292300
--> $DIR/thumb-enum.rs:28:1
293301
|
@@ -357,11 +365,13 @@ error: layout_of(T) = Layout {
357365
},
358366
max_repr_align: None,
359367
unadjusted_abi_align: Align(4 bytes),
368+
randomization_seed: 3872794239216570816,
360369
},
361370
],
362371
},
363372
max_repr_align: None,
364373
unadjusted_abi_align: Align(4 bytes),
374+
randomization_seed: 7745588478433141632,
365375
}
366376
--> $DIR/thumb-enum.rs:34:1
367377
|

‎tests/ui/layout/zero-sized-array-enum-niche.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
2+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
23
#![crate_type = "lib"]
34
#![feature(rustc_attrs)]
45

‎tests/ui/layout/zero-sized-array-enum-niche.stderr

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ error: layout_of(Result<[u32; 0], bool>) = Layout {
5959
},
6060
max_repr_align: None,
6161
unadjusted_abi_align: Align(4 bytes),
62+
randomization_seed: $SEED,
6263
},
6364
Layout {
6465
size: Size(2 bytes),
@@ -92,13 +93,15 @@ error: layout_of(Result<[u32; 0], bool>) = Layout {
9293
},
9394
max_repr_align: None,
9495
unadjusted_abi_align: Align(1 bytes),
96+
randomization_seed: $SEED,
9597
},
9698
],
9799
},
98100
max_repr_align: None,
99101
unadjusted_abi_align: Align(4 bytes),
102+
randomization_seed: $SEED,
100103
}
101-
--> $DIR/zero-sized-array-enum-niche.rs:13:1
104+
--> $DIR/zero-sized-array-enum-niche.rs:14:1
102105
|
103106
LL | type AlignedResult = Result<[u32; 0], bool>;
104107
| ^^^^^^^^^^^^^^^^^^
@@ -164,6 +167,7 @@ error: layout_of(MultipleAlignments) = Layout {
164167
},
165168
max_repr_align: None,
166169
unadjusted_abi_align: Align(2 bytes),
170+
randomization_seed: $SEED,
167171
},
168172
Layout {
169173
size: Size(4 bytes),
@@ -188,6 +192,7 @@ error: layout_of(MultipleAlignments) = Layout {
188192
},
189193
max_repr_align: None,
190194
unadjusted_abi_align: Align(4 bytes),
195+
randomization_seed: $SEED,
191196
},
192197
Layout {
193198
size: Size(2 bytes),
@@ -221,13 +226,15 @@ error: layout_of(MultipleAlignments) = Layout {
221226
},
222227
max_repr_align: None,
223228
unadjusted_abi_align: Align(1 bytes),
229+
randomization_seed: $SEED,
224230
},
225231
],
226232
},
227233
max_repr_align: None,
228234
unadjusted_abi_align: Align(4 bytes),
235+
randomization_seed: $SEED,
229236
}
230-
--> $DIR/zero-sized-array-enum-niche.rs:21:1
237+
--> $DIR/zero-sized-array-enum-niche.rs:22:1
231238
|
232239
LL | enum MultipleAlignments {
233240
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -293,6 +300,7 @@ error: layout_of(Result<[u32; 0], Packed<NonZero<u16>>>) = Layout {
293300
},
294301
max_repr_align: None,
295302
unadjusted_abi_align: Align(4 bytes),
303+
randomization_seed: $SEED,
296304
},
297305
Layout {
298306
size: Size(3 bytes),
@@ -326,13 +334,15 @@ error: layout_of(Result<[u32; 0], Packed<NonZero<u16>>>) = Layout {
326334
},
327335
max_repr_align: None,
328336
unadjusted_abi_align: Align(1 bytes),
337+
randomization_seed: $SEED,
329338
},
330339
],
331340
},
332341
max_repr_align: None,
333342
unadjusted_abi_align: Align(4 bytes),
343+
randomization_seed: $SEED,
334344
}
335-
--> $DIR/zero-sized-array-enum-niche.rs:37:1
345+
--> $DIR/zero-sized-array-enum-niche.rs:38:1
336346
|
337347
LL | type NicheLosesToTagged = Result<[u32; 0], Packed<std::num::NonZero<u16>>>;
338348
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -402,6 +412,7 @@ error: layout_of(Result<[u32; 0], Packed<U16IsZero>>) = Layout {
402412
},
403413
max_repr_align: None,
404414
unadjusted_abi_align: Align(4 bytes),
415+
randomization_seed: $SEED,
405416
},
406417
Layout {
407418
size: Size(2 bytes),
@@ -435,13 +446,15 @@ error: layout_of(Result<[u32; 0], Packed<U16IsZero>>) = Layout {
435446
},
436447
max_repr_align: None,
437448
unadjusted_abi_align: Align(1 bytes),
449+
randomization_seed: $SEED,
438450
},
439451
],
440452
},
441453
max_repr_align: None,
442454
unadjusted_abi_align: Align(4 bytes),
455+
randomization_seed: $SEED,
443456
}
444-
--> $DIR/zero-sized-array-enum-niche.rs:44:1
457+
--> $DIR/zero-sized-array-enum-niche.rs:45:1
445458
|
446459
LL | type NicheWinsOverTagged = Result<[u32; 0], Packed<U16IsZero>>;
447460
| ^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/repr/repr-c-dead-variants.aarch64-unknown-linux-gnu.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ error: layout_of(Univariant) = Layout {
5555
},
5656
max_repr_align: None,
5757
unadjusted_abi_align: Align(4 bytes),
58+
randomization_seed: $SEED,
5859
},
5960
],
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: Align(4 bytes),
64+
randomization_seed: $SEED,
6365
}
64-
--> $DIR/repr-c-dead-variants.rs:38:1
66+
--> $DIR/repr-c-dead-variants.rs:39:1
6567
|
6668
LL | enum Univariant {
6769
| ^^^^^^^^^^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(TwoVariants) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(4 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(8 bytes),
@@ -173,13 +176,15 @@ error: layout_of(TwoVariants) = Layout {
173176
},
174177
max_repr_align: None,
175178
unadjusted_abi_align: Align(4 bytes),
179+
randomization_seed: $SEED,
176180
},
177181
],
178182
},
179183
max_repr_align: None,
180184
unadjusted_abi_align: Align(4 bytes),
185+
randomization_seed: $SEED,
181186
}
182-
--> $DIR/repr-c-dead-variants.rs:45:1
187+
--> $DIR/repr-c-dead-variants.rs:46:1
183188
|
184189
LL | enum TwoVariants {
185190
| ^^^^^^^^^^^^^^^^
@@ -247,6 +252,7 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
247252
Align(8 bytes),
248253
),
249254
unadjusted_abi_align: Align(8 bytes),
255+
randomization_seed: $SEED,
250256
},
251257
Layout {
252258
size: Size(16 bytes),
@@ -271,15 +277,17 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
271277
},
272278
max_repr_align: None,
273279
unadjusted_abi_align: Align(8 bytes),
280+
randomization_seed: $SEED,
274281
},
275282
],
276283
},
277284
max_repr_align: Some(
278285
Align(8 bytes),
279286
),
280287
unadjusted_abi_align: Align(8 bytes),
288+
randomization_seed: $SEED,
281289
}
282-
--> $DIR/repr-c-dead-variants.rs:57:1
290+
--> $DIR/repr-c-dead-variants.rs:58:1
283291
|
284292
LL | enum DeadBranchHasOtherField {
285293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/repr/repr-c-dead-variants.armebv7r-none-eabi.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ error: layout_of(Univariant) = Layout {
5555
},
5656
max_repr_align: None,
5757
unadjusted_abi_align: Align(1 bytes),
58+
randomization_seed: $SEED,
5859
},
5960
],
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: Align(1 bytes),
64+
randomization_seed: $SEED,
6365
}
64-
--> $DIR/repr-c-dead-variants.rs:38:1
66+
--> $DIR/repr-c-dead-variants.rs:39:1
6567
|
6668
LL | enum Univariant {
6769
| ^^^^^^^^^^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(TwoVariants) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(1 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(2 bytes),
@@ -173,13 +176,15 @@ error: layout_of(TwoVariants) = Layout {
173176
},
174177
max_repr_align: None,
175178
unadjusted_abi_align: Align(1 bytes),
179+
randomization_seed: $SEED,
176180
},
177181
],
178182
},
179183
max_repr_align: None,
180184
unadjusted_abi_align: Align(1 bytes),
185+
randomization_seed: $SEED,
181186
}
182-
--> $DIR/repr-c-dead-variants.rs:45:1
187+
--> $DIR/repr-c-dead-variants.rs:46:1
183188
|
184189
LL | enum TwoVariants {
185190
| ^^^^^^^^^^^^^^^^
@@ -247,6 +252,7 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
247252
Align(8 bytes),
248253
),
249254
unadjusted_abi_align: Align(8 bytes),
255+
randomization_seed: $SEED,
250256
},
251257
Layout {
252258
size: Size(16 bytes),
@@ -271,15 +277,17 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
271277
},
272278
max_repr_align: None,
273279
unadjusted_abi_align: Align(8 bytes),
280+
randomization_seed: $SEED,
274281
},
275282
],
276283
},
277284
max_repr_align: Some(
278285
Align(8 bytes),
279286
),
280287
unadjusted_abi_align: Align(8 bytes),
288+
randomization_seed: $SEED,
281289
}
282-
--> $DIR/repr-c-dead-variants.rs:57:1
290+
--> $DIR/repr-c-dead-variants.rs:58:1
283291
|
284292
LL | enum DeadBranchHasOtherField {
285293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/repr/repr-c-dead-variants.i686-pc-windows-msvc.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ error: layout_of(Univariant) = Layout {
5555
},
5656
max_repr_align: None,
5757
unadjusted_abi_align: Align(4 bytes),
58+
randomization_seed: $SEED,
5859
},
5960
],
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: Align(4 bytes),
64+
randomization_seed: $SEED,
6365
}
64-
--> $DIR/repr-c-dead-variants.rs:38:1
66+
--> $DIR/repr-c-dead-variants.rs:39:1
6567
|
6668
LL | enum Univariant {
6769
| ^^^^^^^^^^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(TwoVariants) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(4 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(8 bytes),
@@ -173,13 +176,15 @@ error: layout_of(TwoVariants) = Layout {
173176
},
174177
max_repr_align: None,
175178
unadjusted_abi_align: Align(4 bytes),
179+
randomization_seed: $SEED,
176180
},
177181
],
178182
},
179183
max_repr_align: None,
180184
unadjusted_abi_align: Align(4 bytes),
185+
randomization_seed: $SEED,
181186
}
182-
--> $DIR/repr-c-dead-variants.rs:45:1
187+
--> $DIR/repr-c-dead-variants.rs:46:1
183188
|
184189
LL | enum TwoVariants {
185190
| ^^^^^^^^^^^^^^^^
@@ -247,6 +252,7 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
247252
Align(8 bytes),
248253
),
249254
unadjusted_abi_align: Align(8 bytes),
255+
randomization_seed: $SEED,
250256
},
251257
Layout {
252258
size: Size(16 bytes),
@@ -271,15 +277,17 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
271277
},
272278
max_repr_align: None,
273279
unadjusted_abi_align: Align(8 bytes),
280+
randomization_seed: $SEED,
274281
},
275282
],
276283
},
277284
max_repr_align: Some(
278285
Align(8 bytes),
279286
),
280287
unadjusted_abi_align: Align(8 bytes),
288+
randomization_seed: $SEED,
281289
}
282-
--> $DIR/repr-c-dead-variants.rs:57:1
290+
--> $DIR/repr-c-dead-variants.rs:58:1
283291
|
284292
LL | enum DeadBranchHasOtherField {
285293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/repr/repr-c-dead-variants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// See also: repr-c-int-dead-variants.rs
88

99
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
10+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
1011

1112
// This test depends on the value of the `c_enum_min_bits` target option.
1213
// As there's no way to actually check it from UI test, we only run this test on a subset of archs.

‎tests/ui/repr/repr-c-dead-variants.x86_64-unknown-linux-gnu.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ error: layout_of(Univariant) = Layout {
5555
},
5656
max_repr_align: None,
5757
unadjusted_abi_align: Align(4 bytes),
58+
randomization_seed: $SEED,
5859
},
5960
],
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: Align(4 bytes),
64+
randomization_seed: $SEED,
6365
}
64-
--> $DIR/repr-c-dead-variants.rs:38:1
66+
--> $DIR/repr-c-dead-variants.rs:39:1
6567
|
6668
LL | enum Univariant {
6769
| ^^^^^^^^^^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(TwoVariants) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(4 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(8 bytes),
@@ -173,13 +176,15 @@ error: layout_of(TwoVariants) = Layout {
173176
},
174177
max_repr_align: None,
175178
unadjusted_abi_align: Align(4 bytes),
179+
randomization_seed: $SEED,
176180
},
177181
],
178182
},
179183
max_repr_align: None,
180184
unadjusted_abi_align: Align(4 bytes),
185+
randomization_seed: $SEED,
181186
}
182-
--> $DIR/repr-c-dead-variants.rs:45:1
187+
--> $DIR/repr-c-dead-variants.rs:46:1
183188
|
184189
LL | enum TwoVariants {
185190
| ^^^^^^^^^^^^^^^^
@@ -247,6 +252,7 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
247252
Align(8 bytes),
248253
),
249254
unadjusted_abi_align: Align(8 bytes),
255+
randomization_seed: $SEED,
250256
},
251257
Layout {
252258
size: Size(16 bytes),
@@ -271,15 +277,17 @@ error: layout_of(DeadBranchHasOtherField) = Layout {
271277
},
272278
max_repr_align: None,
273279
unadjusted_abi_align: Align(8 bytes),
280+
randomization_seed: $SEED,
274281
},
275282
],
276283
},
277284
max_repr_align: Some(
278285
Align(8 bytes),
279286
),
280287
unadjusted_abi_align: Align(8 bytes),
288+
randomization_seed: $SEED,
281289
}
282-
--> $DIR/repr-c-dead-variants.rs:57:1
290+
--> $DIR/repr-c-dead-variants.rs:58:1
283291
|
284292
LL | enum DeadBranchHasOtherField {
285293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/repr/repr-c-int-dead-variants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// See also: repr-c-dead-variants.rs
55

66
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
7+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
78

89
// A simple uninhabited type.
910
enum Void {}

‎tests/ui/repr/repr-c-int-dead-variants.stderr

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ error: layout_of(UnivariantU8) = Layout {
5555
},
5656
max_repr_align: None,
5757
unadjusted_abi_align: Align(1 bytes),
58+
randomization_seed: $SEED,
5859
},
5960
],
6061
},
6162
max_repr_align: None,
6263
unadjusted_abi_align: Align(1 bytes),
64+
randomization_seed: $SEED,
6365
}
64-
--> $DIR/repr-c-int-dead-variants.rs:14:1
66+
--> $DIR/repr-c-int-dead-variants.rs:15:1
6567
|
6668
LL | enum UnivariantU8 {
6769
| ^^^^^^^^^^^^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(TwoVariantsU8) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(1 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(2 bytes),
@@ -173,13 +176,15 @@ error: layout_of(TwoVariantsU8) = Layout {
173176
},
174177
max_repr_align: None,
175178
unadjusted_abi_align: Align(1 bytes),
179+
randomization_seed: $SEED,
176180
},
177181
],
178182
},
179183
max_repr_align: None,
180184
unadjusted_abi_align: Align(1 bytes),
185+
randomization_seed: $SEED,
181186
}
182-
--> $DIR/repr-c-int-dead-variants.rs:21:1
187+
--> $DIR/repr-c-int-dead-variants.rs:22:1
183188
|
184189
LL | enum TwoVariantsU8 {
185190
| ^^^^^^^^^^^^^^^^^^
@@ -247,6 +252,7 @@ error: layout_of(DeadBranchHasOtherFieldU8) = Layout {
247252
Align(8 bytes),
248253
),
249254
unadjusted_abi_align: Align(8 bytes),
255+
randomization_seed: $SEED,
250256
},
251257
Layout {
252258
size: Size(16 bytes),
@@ -271,15 +277,17 @@ error: layout_of(DeadBranchHasOtherFieldU8) = Layout {
271277
},
272278
max_repr_align: None,
273279
unadjusted_abi_align: Align(8 bytes),
280+
randomization_seed: $SEED,
274281
},
275282
],
276283
},
277284
max_repr_align: Some(
278285
Align(8 bytes),
279286
),
280287
unadjusted_abi_align: Align(8 bytes),
288+
randomization_seed: $SEED,
281289
}
282-
--> $DIR/repr-c-int-dead-variants.rs:33:1
290+
--> $DIR/repr-c-int-dead-variants.rs:34:1
283291
|
284292
LL | enum DeadBranchHasOtherFieldU8 {
285293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/type/pattern_types/range_patterns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![allow(incomplete_features)]
44

55
//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
6+
//@ normalize-stderr-test: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
67

78
use std::pat::pattern_type;
89

‎tests/ui/type/pattern_types/range_patterns.stderr

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ error: layout_of(NonZero<u32>) = Layout {
3636
},
3737
max_repr_align: None,
3838
unadjusted_abi_align: Align(4 bytes),
39+
randomization_seed: $SEED,
3940
}
40-
--> $DIR/range_patterns.rs:10:1
41+
--> $DIR/range_patterns.rs:11:1
4142
|
4243
LL | type X = std::num::NonZeroU32;
4344
| ^^^^^^
@@ -73,8 +74,9 @@ error: layout_of((u32) is 1..=) = Layout {
7374
},
7475
max_repr_align: None,
7576
unadjusted_abi_align: Align(4 bytes),
77+
randomization_seed: $SEED,
7678
}
77-
--> $DIR/range_patterns.rs:12:1
79+
--> $DIR/range_patterns.rs:13:1
7880
|
7981
LL | type Y = pattern_type!(u32 is 1..);
8082
| ^^^^^^
@@ -137,6 +139,7 @@ error: layout_of(Option<(u32) is 1..=>) = Layout {
137139
},
138140
max_repr_align: None,
139141
unadjusted_abi_align: Align(1 bytes),
142+
randomization_seed: $SEED,
140143
},
141144
Layout {
142145
size: Size(4 bytes),
@@ -176,13 +179,15 @@ error: layout_of(Option<(u32) is 1..=>) = Layout {
176179
},
177180
max_repr_align: None,
178181
unadjusted_abi_align: Align(4 bytes),
182+
randomization_seed: $SEED,
179183
},
180184
],
181185
},
182186
max_repr_align: None,
183187
unadjusted_abi_align: Align(4 bytes),
188+
randomization_seed: $SEED,
184189
}
185-
--> $DIR/range_patterns.rs:14:1
190+
--> $DIR/range_patterns.rs:15:1
186191
|
187192
LL | type Z = Option<pattern_type!(u32 is 1..)>;
188193
| ^^^^^^
@@ -245,6 +250,7 @@ error: layout_of(Option<NonZero<u32>>) = Layout {
245250
},
246251
max_repr_align: None,
247252
unadjusted_abi_align: Align(1 bytes),
253+
randomization_seed: $SEED,
248254
},
249255
Layout {
250256
size: Size(4 bytes),
@@ -284,13 +290,15 @@ error: layout_of(Option<NonZero<u32>>) = Layout {
284290
},
285291
max_repr_align: None,
286292
unadjusted_abi_align: Align(4 bytes),
293+
randomization_seed: $SEED,
287294
},
288295
],
289296
},
290297
max_repr_align: None,
291298
unadjusted_abi_align: Align(4 bytes),
299+
randomization_seed: $SEED,
292300
}
293-
--> $DIR/range_patterns.rs:16:1
301+
--> $DIR/range_patterns.rs:17:1
294302
|
295303
LL | type A = Option<std::num::NonZeroU32>;
296304
| ^^^^^^
@@ -333,8 +341,9 @@ error: layout_of(NonZeroU32New) = Layout {
333341
},
334342
max_repr_align: None,
335343
unadjusted_abi_align: Align(4 bytes),
344+
randomization_seed: $SEED,
336345
}
337-
--> $DIR/range_patterns.rs:18:1
346+
--> $DIR/range_patterns.rs:19:1
338347
|
339348
LL | struct NonZeroU32New(pattern_type!(u32 is 1..));
340349
| ^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)
Please sign in to comment.