rust/tests/fail/intrinsics/raw_eq_on_ptr.rs
2022-08-12 11:24:55 -04:00

12 lines
273 B
Rust

#![feature(intrinsics)]
extern "rust-intrinsic" {
fn raw_eq<T>(a: &T, b: &T) -> bool;
}
fn main() {
let x = &0;
// FIXME: the error message is not great (should be UB rather than 'unsupported')
unsafe { raw_eq(&x, &x) }; //~ERROR: unsupported operation
}