rust/src/test/ui/unsafe/unsafe-unstable-const-fn.rs

14 lines
363 B
Rust
Raw Normal View History

2020-05-20 14:55:38 -07:00
#![stable(feature = "foo", since = "1.33.0")]
#![feature(staged_api)]
#![feature(const_compare_raw_pointers)]
#![feature(const_fn)]
#[stable(feature = "foo", since = "1.33.0")]
#[rustc_const_unstable(feature = "const_foo", issue = "none")]
const fn unstable(a: *const i32, b: *const i32) -> bool {
a == b
//~^ pointer operation is unsafe
}
fn main() {}