]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unsafe/unsafe-unstable-const-fn.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / unsafe / unsafe-unstable-const-fn.rs
CommitLineData
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)]
f9f354fc
XL
6
7#[stable(feature = "foo", since = "1.33.0")]
8#[rustc_const_unstable(feature = "const_foo", issue = "none")]
f035d41b
XL
9const fn unstable(a: *const i32, b: i32) -> bool {
10 *a == b
11 //~^ dereference of raw pointer is unsafe
f9f354fc
XL
12}
13
14fn main() {}