]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsafe/unsafe-unstable-const-fn.rs
Stabilize File::options()
[rust.git] / src / test / ui / unsafe / unsafe-unstable-const-fn.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 #![stable(feature = "foo", since = "1.33.0")]
5 #![feature(staged_api)]
6 #![feature(const_raw_ptr_deref)]
7
8 #[stable(feature = "foo", since = "1.33.0")]
9 #[rustc_const_unstable(feature = "const_foo", issue = "none")]
10 const fn unstable(a: *const i32, b: i32) -> bool {
11     *a == b
12     //~^ dereference of raw pointer is unsafe
13 }
14
15 fn main() {}