summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
blob: 57358fbdd8404139e644e91b63764a4bc23ecbce (plain)
1
2
3
4
5
6
7
8
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck

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
}