blob: 0476759ca6d980f44af8889e640d5030178e0f79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
#![stable(feature = "foo", since = "1.33.0")]
#![feature(staged_api)]
#![feature(const_raw_ptr_deref)]
#[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() {}
|