You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix ui pattern_types test for big-endian platforms
The newly added pattern types validity tests fail on s390x and
presumably other big-endian systems, due to print of raw values
with padding bytes.
To fix the tests remove the raw output values in the error note by
`normalize-stderr`.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
6
6
|
7
7
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8
8
= note: the raw bytes of the constant (size: 4, align: 4) {
9
-
00 00 00 00 │ ....
9
+
HEX_DUMP
10
10
}
11
11
12
12
error[E0080]: evaluation of constant value failed
13
-
--> $DIR/validity.rs:11:1
13
+
--> $DIR/validity.rs:13:1
14
14
|
15
15
LL | const BAD_UNINIT: pattern_type!(u32 is 1..) =
16
16
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
32
32
|
33
33
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
34
34
= note: the raw bytes of the constant (size: 8, align: 4) {
35
-
00 00 00 00 00 00 00 00 │ ........
35
+
HEX_DUMP
36
36
}
37
37
38
38
error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^ constructing invalid value at .0.0: encountered 0, but expected something greater or equal to 1
43
43
|
44
44
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
45
45
= note: the raw bytes of the constant (size: 4, align: 4) {
46
-
00 00 00 00 │ ....
46
+
HEX_DUMP
47
47
}
48
48
49
49
error[E0080]: evaluation of constant value failed
50
-
--> $DIR/validity.rs:27:1
50
+
--> $DIR/validity.rs:29:1
51
51
|
52
52
LL | const CHAR_UNINIT: pattern_type!(char is 'A'..'Z') =
53
53
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
54
54
55
55
error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 97, but expected something in the range 65..=89
60
60
|
61
61
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
62
62
= note: the raw bytes of the constant (size: 4, align: 4) {
63
-
61 00 00 00 │ a...
63
+
HEX_DUMP
64
64
}
65
65
66
66
error[E0080]: it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
71
71
|
72
72
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
73
73
= note: the raw bytes of the constant (size: 4, align: 4) {
0 commit comments