mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
22 lines
215 B
Rust
22 lines
215 B
Rust
#![crate_type = "lib"]
|
|
|
|
struct Bar;
|
|
|
|
impl Bar {
|
|
#[no_mangle]
|
|
fn bar() -> u8 {
|
|
2
|
|
}
|
|
}
|
|
|
|
trait Foo {
|
|
fn baz() -> u8;
|
|
}
|
|
|
|
impl Foo for Bar {
|
|
#[no_mangle]
|
|
fn baz() -> u8 {
|
|
3
|
|
}
|
|
}
|