Skip to content

Commit d064494

Browse files
committed
Bless a UI test
1 parent 07fb5ee commit d064494

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

Diff for: src/test/ui/intrinsics/intrinsic-raw_eq-const-padding.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
const BAD_RAW_EQ_CALL: bool = unsafe {
66
std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
7-
//~^ ERROR any use of this value will cause an error
8-
//~| WARNING this was previously accepted by the compiler but is being phased out
7+
//~^ ERROR evaluation of constant value failed
98
};
109

1110
pub fn main() {
+4-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
error: any use of this value will cause an error
1+
error[E0080]: evaluation of constant value failed
22
--> $DIR/intrinsic-raw_eq-const-padding.rs:6:5
33
|
4-
LL | / const BAD_RAW_EQ_CALL: bool = unsafe {
5-
LL | | std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
6-
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading 4 bytes of memory starting at alloc2, but 1 byte is uninitialized starting at alloc2+0x1, and this operation requires initialized memory
7-
LL | |
8-
LL | |
9-
LL | | };
10-
| |__-
11-
|
12-
note: the lint level is defined here
13-
--> $DIR/intrinsic-raw_eq-const-padding.rs:3:9
14-
|
15-
LL | #![deny(const_err)]
16-
| ^^^^^^^^^
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
4+
LL | std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading 4 bytes of memory starting at alloc2, but 1 byte is uninitialized starting at alloc2+0x1, and this operation requires initialized memory
196

207
error: aborting due to previous error
218

9+
For more information about this error, try `rustc --explain E0080`.

0 commit comments

Comments
 (0)