]> git.lizzy.rs Git - rust.git/blob - src/test/compile-fail/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
Rollup merge of #69120 - spunit262:invalid-sugar-suggest, r=matthewjasper
[rust.git] / src / test / compile-fail / coerce-unsafe-closure-to-unsafe-fn-ptr.rs
1 fn main() {
2     let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
3     //~^ ERROR E0133
4     let _: unsafe fn() = || unsafe { ::std::pin::Pin::new_unchecked(&0_u8); }; // OK
5 }