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