]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/safety-inherent-impl.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / 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() { }