summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsafe/unsafe-unstable-const-fn.rs
blob: 581b15cdfb0cd4796bbdc4582259c28d039d4663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck

#![stable(feature = "foo", since = "1.33.0")]
#![feature(staged_api)]

#[stable(feature = "foo", since = "1.33.0")]
#[rustc_const_unstable(feature = "const_foo", issue = "none")]
const fn unstable(a: *const i32, b: i32) -> bool {
    *a == b
    //~^ dereference of raw pointer is unsafe
}

fn main() {}