rust/tests/ui/extern/auxiliary/no-mangle-associated-fn.rs

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
}
}