]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsafe/unsafe-unstable-const-fn.rs
Rollup merge of #85766 - workingjubilee:file-options, r=yaahc
[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
7 #[stable(feature = "foo", since = "1.33.0")]
8 #[rustc_const_unstable(feature = "const_foo", issue = "none")]
9 const fn unstable(a: *const i32, b: i32) -> bool {
10     *a == b
11     //~^ dereference of raw pointer is unsafe
12 }
13
14 fn main() {}