Skip to content

Commit d997bc9

Browse files
committed
Simplify or delete normalize directives that don't care about bit-width
1 parent 917bfa7 commit d997bc9

10 files changed

+22
-31
lines changed

tests/ui/const-generics/transmute-fail.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-tidy-linelength
2-
//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
3-
//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
2+
//@ normalize-stderr-test: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
43

54

65
#![feature(transmute_generic_consts)]

tests/ui/const-generics/transmute-fail.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: the constant `W` is not of type `usize`
2-
--> $DIR/transmute-fail.rs:17:42
2+
--> $DIR/transmute-fail.rs:16:42
33
|
44
LL | fn bar<const W: bool, const H: usize>(v: [[u32; H]; W]) -> [[u32; W]; H] {
55
| ^^^^^^^^^^^^^ expected `usize`, found `bool`
66

77
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
8-
--> $DIR/transmute-fail.rs:12:9
8+
--> $DIR/transmute-fail.rs:11:9
99
|
1010
LL | std::mem::transmute(v)
1111
| ^^^^^^^^^^^^^^^^^^^
@@ -14,13 +14,13 @@ LL | std::mem::transmute(v)
1414
= note: target type: `[[u32; W + 1]; H]` (size can vary because of [u32; W + 1])
1515

1616
error: the constant `W` is not of type `usize`
17-
--> $DIR/transmute-fail.rs:20:9
17+
--> $DIR/transmute-fail.rs:19:9
1818
|
1919
LL | std::mem::transmute(v)
2020
| ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `bool`
2121

2222
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
23-
--> $DIR/transmute-fail.rs:27:9
23+
--> $DIR/transmute-fail.rs:26:9
2424
|
2525
LL | std::mem::transmute(v)
2626
| ^^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | std::mem::transmute(v)
2929
= note: target type: `[u32; W * H * H]` (this type does not have a fixed size)
3030

3131
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
32-
--> $DIR/transmute-fail.rs:34:9
32+
--> $DIR/transmute-fail.rs:33:9
3333
|
3434
LL | std::mem::transmute(v)
3535
| ^^^^^^^^^^^^^^^^^^^
@@ -38,7 +38,7 @@ LL | std::mem::transmute(v)
3838
= note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
3939

4040
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
41-
--> $DIR/transmute-fail.rs:40:14
41+
--> $DIR/transmute-fail.rs:39:14
4242
|
4343
LL | unsafe { std::mem::transmute(v) }
4444
| ^^^^^^^^^^^^^^^^^^^
@@ -47,7 +47,7 @@ LL | unsafe { std::mem::transmute(v) }
4747
= note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
4848

4949
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
50-
--> $DIR/transmute-fail.rs:46:9
50+
--> $DIR/transmute-fail.rs:45:9
5151
|
5252
LL | std::mem::transmute(v)
5353
| ^^^^^^^^^^^^^^^^^^^
@@ -56,7 +56,7 @@ LL | std::mem::transmute(v)
5656
= note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])
5757

5858
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
59-
--> $DIR/transmute-fail.rs:57:9
59+
--> $DIR/transmute-fail.rs:56:9
6060
|
6161
LL | std::mem::transmute(v)
6262
| ^^^^^^^^^^^^^^^^^^^
@@ -65,7 +65,7 @@ LL | std::mem::transmute(v)
6565
= note: target type: `[u32; W * H]` (this type does not have a fixed size)
6666

6767
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
68-
--> $DIR/transmute-fail.rs:64:9
68+
--> $DIR/transmute-fail.rs:63:9
6969
|
7070
LL | std::mem::transmute(v)
7171
| ^^^^^^^^^^^^^^^^^^^
@@ -74,7 +74,7 @@ LL | std::mem::transmute(v)
7474
= note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])
7575

7676
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
77-
--> $DIR/transmute-fail.rs:73:9
77+
--> $DIR/transmute-fail.rs:72:9
7878
|
7979
LL | std::mem::transmute(v)
8080
| ^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ LL | std::mem::transmute(v)
8383
= note: target type: `[u32; D * W * H]` (this type does not have a fixed size)
8484

8585
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
86-
--> $DIR/transmute-fail.rs:82:9
86+
--> $DIR/transmute-fail.rs:81:9
8787
|
8888
LL | std::mem::transmute(v)
8989
| ^^^^^^^^^^^^^^^^^^^
@@ -92,7 +92,7 @@ LL | std::mem::transmute(v)
9292
= note: target type: `[[u32; D * W]; H]` (size can vary because of [u32; D * W])
9393

9494
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
95-
--> $DIR/transmute-fail.rs:89:9
95+
--> $DIR/transmute-fail.rs:88:9
9696
|
9797
LL | std::mem::transmute(v)
9898
| ^^^^^^^^^^^^^^^^^^^
@@ -101,7 +101,7 @@ LL | std::mem::transmute(v)
101101
= note: target type: `[u8; L * 2]` (this type does not have a fixed size)
102102

103103
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
104-
--> $DIR/transmute-fail.rs:96:9
104+
--> $DIR/transmute-fail.rs:95:9
105105
|
106106
LL | std::mem::transmute(v)
107107
| ^^^^^^^^^^^^^^^^^^^
@@ -110,7 +110,7 @@ LL | std::mem::transmute(v)
110110
= note: target type: `[u16; L]` (this type does not have a fixed size)
111111

112112
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
113-
--> $DIR/transmute-fail.rs:103:9
113+
--> $DIR/transmute-fail.rs:102:9
114114
|
115115
LL | std::mem::transmute(v)
116116
| ^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ LL | std::mem::transmute(v)
119119
= note: target type: `[[u8; 1]; L]` (this type does not have a fixed size)
120120

121121
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
122-
--> $DIR/transmute-fail.rs:112:9
122+
--> $DIR/transmute-fail.rs:111:9
123123
|
124124
LL | std::mem::transmute(v)
125125
| ^^^^^^^^^^^^^^^^^^^

tests/ui/consts/issue-17718-const-bad-values.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//@ normalize-stderr-32bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
2-
//@ normalize-stderr-64bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
1+
//@ normalize-stderr-test: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)"
32
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
43

54
#![allow(static_mut_refs)]

tests/ui/consts/issue-17718-const-bad-values.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0764]: mutable references are not allowed in the final value of constants
2-
--> $DIR/issue-17718-const-bad-values.rs:7:34
2+
--> $DIR/issue-17718-const-bad-values.rs:6:34
33
|
44
LL | const C1: &'static mut [usize] = &mut [];
55
| ^^^^^^^
66

77
error[E0080]: it is undefined behavior to use this value
8-
--> $DIR/issue-17718-const-bad-values.rs:11:1
8+
--> $DIR/issue-17718-const-bad-values.rs:10:1
99
|
1010
LL | const C2: &'static mut i32 = unsafe { &mut S };
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
//@ compile-flags:-C debuginfo=2
55
//@ build-fail
66
//@ error-pattern: too big for the target architecture
7-
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
8-
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
97

108
#![crate_type = "rlib"]
119

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//@ compile-flags:-C debuginfo=2
77
//@ build-fail
88
//@ error-pattern: too big for the target architecture
9-
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
10-
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
119

1210
#![crate_type = "rlib"]
1311

tests/ui/limits/huge-struct.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
//@ build-fail
33
//@ normalize-stderr-test: "S32" -> "SXX"
44
//@ normalize-stderr-test: "S1M" -> "SXX"
5-
//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
6-
//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
5+
//@ normalize-stderr-test: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big"
76

87
struct S32<T> {
98
v0: T,

tests/ui/limits/huge-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: values of the type $REALLY_TOO_BIG are too big for the target architecture
2-
--> $DIR/huge-struct.rs:48:9
2+
--> $DIR/huge-struct.rs:47:9
33
|
44
LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None;
55
| ^^^

tests/ui/limits/issue-55878.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
//@ build-fail
2-
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
3-
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
42

53
//@ error-pattern: are too big for the target architecture
64
fn main() {

tests/ui/limits/issue-55878.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ error[E0080]: evaluation of constant value failed
66
note: inside `std::mem::size_of::<[u8; usize::MAX]>`
77
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
88
note: inside `main`
9-
--> $DIR/issue-55878.rs:7:26
9+
--> $DIR/issue-55878.rs:5:26
1010
|
1111
LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
1212
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)