rust/tests/ui/extern/auxiliary/no-mangle-associated-fn.rs
2023-01-11 09:32:08 +00:00

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