summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/auxiliary/trait_safety_lib.rs
blob: 6fc432ed45504914015f5568a0b44ff08046b66f (plain)
1
2
3
4
5
6
7
8
9
// Simple smoke test that unsafe traits can be compiled etc.

pub unsafe trait Foo {
    fn foo(&self) -> isize;
}

unsafe impl Foo for isize {
    fn foo(&self) -> isize { *self }
}