]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/safety-inherent-impl.rs
Rollup merge of #100953 - joshtriplett:write-docs, r=Mark-Simulacrum
[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() { }