mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
10 lines
360 B
Rust
10 lines
360 B
Rust
//@revisions: stable gated
|
|
#![cfg_attr(gated, feature(const_trait_impl))]
|
|
|
|
fn main() {}
|
|
|
|
// unconst and bad, will thus error in miri
|
|
const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR pointers cannot
|
|
// unconst and bad, will thus error in miri
|
|
const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; //~ ERROR pointers cannot
|