diff options
Diffstat (limited to 'src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs')
-rw-r--r-- | src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs b/src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs new file mode 100644 index 000000000..7fc73c76c --- /dev/null +++ b/src/test/ui/extern/auxiliary/no-mangle-associated-fn.rs @@ -0,0 +1,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 + } +} |