]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-safety-inherent-impl.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-safety-inherent-impl.rs
CommitLineData
1a4d82fc 1// Check that inherent impls cannot be unsafe.
223e47cc 2
1a4d82fc
JJ
3struct SomeStruct;
4
2c00a5a8 5unsafe impl SomeStruct { //~ ERROR inherent impls cannot be unsafe
1a4d82fc 6 fn foo(self) { }
223e47cc
LB
7}
8
9fn main() { }