mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +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
|
|
}
|
|
}
|