]>
Commit | Line | Data |
---|---|---|
17df50a5 XL |
1 | // revisions: mir thir |
2 | // [thir]compile-flags: -Z thir-unsafeck | |
3 | ||
f9f354fc XL |
4 | #![stable(feature = "foo", since = "1.33.0")] |
5 | #![feature(staged_api)] | |
f035d41b | 6 | #![feature(const_raw_ptr_deref)] |
f9f354fc XL |
7 | |
8 | #[stable(feature = "foo", since = "1.33.0")] | |
9 | #[rustc_const_unstable(feature = "const_foo", issue = "none")] | |
f035d41b XL |
10 | const fn unstable(a: *const i32, b: i32) -> bool { |
11 | *a == b | |
12 | //~^ dereference of raw pointer is unsafe | |
f9f354fc XL |
13 | } |
14 | ||
15 | fn main() {} |