diff options
Diffstat (limited to 'tests/ui/duplicate/dupe-symbols-4.rs')
-rw-r--r-- | tests/ui/duplicate/dupe-symbols-4.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/duplicate/dupe-symbols-4.rs b/tests/ui/duplicate/dupe-symbols-4.rs new file mode 100644 index 000000000..de6610c3e --- /dev/null +++ b/tests/ui/duplicate/dupe-symbols-4.rs @@ -0,0 +1,24 @@ +// build-fail + +// +// error-pattern: symbol `fail` is already defined +#![crate_type="rlib"] +#![allow(warnings)] + + +pub trait A { + fn fail(self); +} + +struct B; +struct C; + +impl A for B { + #[no_mangle] + fn fail(self) {} +} + +impl A for C { + #[no_mangle] + fn fail(self) {} +} |