2 // [thir]compile-flags: -Z thir-unsafeck
4 // This note is annotated because the purpose of the test
5 // is to ensure that certain other notes are not generated.
6 #![deny(unused_unsafe)] //~ NOTE
9 // (test that no note is generated on this unsafe fn)
12 unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe`
20 // (test that no note is generated on this unsafe block)
23 unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe`
26 // `()` is fine to zero-initialize as it is zero sized and inhabited.
27 let () = ::std::mem::zeroed();