rust/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
192 B
Rust
Raw Permalink Normal View History

2019-03-31 10:00:43 -05:00
fn main() {
let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
//~^ ERROR E0133
let _: unsafe fn() = || unsafe { ::std::pin::Pin::new_unchecked(&0_u8); }; // OK
}