]> git.lizzy.rs Git - rust.git/blob - src/test/ui/auxiliary/no-mangle-associated-fn.rs
Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc
[rust.git] / src / test / ui / auxiliary / no-mangle-associated-fn.rs
1 #![crate_type = "lib"]
2
3 struct Bar;
4
5 impl Bar {
6     #[no_mangle]
7     fn bar() -> u8 {
8         2
9     }
10 }
11
12 trait Foo {
13     fn baz() -> u8;
14 }
15
16 impl Foo for Bar {
17     #[no_mangle]
18     fn baz() -> u8 {
19         3
20     }
21 }