rust/tests/ui/unsafe/unsafe-const-fn.rs
Matthew Jasper 982b49494e Remove revisions for THIR unsafeck
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00

13 lines
198 B
Rust

// A quick test of 'unsafe const fn' functionality
const unsafe fn dummy(v: u32) -> u32 {
!v
}
const VAL: u32 = dummy(0xFFFF);
//~^ ERROR E0133
fn main() {
assert_eq!(VAL, 0xFFFF0000);
}