Skip to content

Commit b192e70

Browse files
committed
Bless 32bit tests.
1 parent 49f74f7 commit b192e70

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/ui/consts/const-eval/raw-bytes.32bit.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,10 @@ LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999us
331331
}
332332

333333
error[E0080]: constructing invalid value of type &[bool; 1]: at .<deref>[0], encountered 0x03, but expected a boolean
334-
--> $DIR/raw-bytes.rs:160:1
334+
--> $DIR/raw-bytes.rs:160:40
335335
|
336336
LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
337-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
337+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
338338
|
339339
= 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.
340340
= note: the raw bytes of the constant (size: 4, align: 4) {
@@ -348,10 +348,10 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
348348
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
349349

350350
error[E0080]: constructing invalid value of type &MySlice<[bool; 1]>: at .<deref>.0, encountered 0x03, but expected a boolean
351-
--> $DIR/raw-bytes.rs:164:1
351+
--> $DIR/raw-bytes.rs:164:42
352352
|
353353
LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
354-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
354+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
355355
|
356356
= 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.
357357
= note: the raw bytes of the constant (size: 4, align: 4) {
@@ -365,10 +365,10 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
365365
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366366

367367
error[E0080]: constructing invalid value of type &MySlice<[bool; 1]>: at .<deref>.1[0], encountered 0x03, but expected a boolean
368-
--> $DIR/raw-bytes.rs:167:1
368+
--> $DIR/raw-bytes.rs:167:42
369369
|
370370
LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
371-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
371+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
372372
|
373373
= 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.
374374
= note: the raw bytes of the constant (size: 4, align: 4) {

tests/ui/consts/interior-mut-const-via-union.32bit.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0080]: constructing invalid value of type &S: at .<deref>.y.<enum-variant(B)>.0, encountered `UnsafeCell` in read-only memory
22
--> $DIR/interior-mut-const-via-union.rs:34:1
33
|
4-
LL | fn main() {
5-
| ^^^^^^^^^ it is undefined behavior to use this value
4+
LL | let _: &'static _ = &C;
5+
| ^^ it is undefined behavior to use this value
66
|
77
= 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.
88
= note: the raw bytes of the constant (size: 4, align: 4) {

0 commit comments

Comments
 (0)