Skip to content

Commit cc4f8b0

Browse files
committed
Bless 32bit tests.
1 parent 1c8e593 commit cc4f8b0

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
_9 = const _; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
2929
// mir::Constant
3030
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:9:25: 9:35
31-
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
31+
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main::{promoted#0}, [&[i32; 3]]) }
3232
_3 = &(*_9); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
3333
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
3434
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35

tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
_9 = const _; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
2222
// mir::Constant
2323
// + span: $DIR/slice_len.rs:8:6: 8:19
24-
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
24+
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main::{promoted#0}, [&[u32; 3]]) }
2525
_4 = _9; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
2626
_3 = _4; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
2727
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19

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

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

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

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

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

tests/ui/consts/invalid-union.32bit.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
error[E0080]: it is undefined behavior to use this value
2-
--> $DIR/invalid-union.rs:41:1
2+
--> $DIR/invalid-union.rs:42:25
33
|
4-
LL | fn main() {
5-
| ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
4+
LL | let _: &'static _ = &C;
5+
| ^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
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) {
99
╾─alloc7──╼ │ ╾──╼
1010
}
1111

1212
note: erroneous constant used
13-
--> $DIR/invalid-union.rs:43:25
13+
--> $DIR/invalid-union.rs:42:25
1414
|
1515
LL | let _: &'static _ = &C;
1616
| ^^
1717

1818
note: erroneous constant used
19-
--> $DIR/invalid-union.rs:43:25
19+
--> $DIR/invalid-union.rs:42:25
2020
|
2121
LL | let _: &'static _ = &C;
2222
| ^^

0 commit comments

Comments
 (0)