mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
18 lines
432 B
Rust
18 lines
432 B
Rust
#![feature(core_intrinsics)]
|
|
#![feature(const_intrinsic_raw_eq)]
|
|
|
|
const RAW_EQ_PADDING: bool = unsafe {
|
|
std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
|
|
//~^ ERROR evaluation of constant value failed
|
|
//~| requires initialized memory
|
|
};
|
|
|
|
const RAW_EQ_PTR: bool = unsafe {
|
|
std::intrinsics::raw_eq(&(&0), &(&1))
|
|
//~^ ERROR evaluation of constant value failed
|
|
//~| `raw_eq` on bytes with provenance
|
|
};
|
|
|
|
pub fn main() {
|
|
}
|