summaryrefslogtreecommitdiffstats
path: root/src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs
blob: 7fc73c76cc92a7448f9685fb00476460382de1ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![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
    }
}