2021-03-14 20:11:37 +01:00
|
|
|
// revisions: mir thir
|
|
|
|
// [thir]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2019-04-01 00:00:43 +09: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
|
|
|
|
}
|