]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
Auto merge of #107541 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / ui / closures / coerce-unsafe-closure-to-unsafe-fn-ptr.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 fn main() {
5     let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
6     //~^ ERROR E0133
7     let _: unsafe fn() = || unsafe { ::std::pin::Pin::new_unchecked(&0_u8); }; // OK
8 }