Skip to content

Commit

Permalink
Bless a UI test
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Jul 8, 2021
1 parent 07fb5ee commit d064494
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/test/ui/intrinsics/intrinsic-raw_eq-const-padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

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

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

error: aborting due to previous error

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

0 comments on commit d064494

Please sign in to comment.