summaryrefslogtreecommitdiffstats
path: root/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs
blob: 0e894ef581c38cf6e57d58d21b151f1f6ad7c875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![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() {
}