]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/safety-inherent-impl.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / traits / safety-inherent-impl.rs
1 // Check that inherent impls cannot be unsafe.
2
3 struct SomeStruct;
4
5 unsafe impl SomeStruct { //~ ERROR inherent impls cannot be unsafe
6     fn foo(self) { }
7 }
8
9 fn main() { }