2021-05-14 23:19:59 +02:00
|
|
|
// revisions: mir thir
|
|
|
|
// [thir]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2020-05-20 14:55:38 -07:00
|
|
|
#![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")]
|
2020-06-12 19:25:14 +02:00
|
|
|
const fn unstable(a: *const i32, b: i32) -> bool {
|
|
|
|
*a == b
|
|
|
|
//~^ dereference of raw pointer is unsafe
|
2020-05-20 14:55:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|