mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
10 lines
183 B
Rust
10 lines
183 B
Rust
// 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 }
|
|
}
|