summaryrefslogtreecommitdiffstats
path: root/src/test/ui/duplicate/dupe-symbols-2.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/duplicate/dupe-symbols-2.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/duplicate/dupe-symbols-2.rs b/src/test/ui/duplicate/dupe-symbols-2.rs
new file mode 100644
index 000000000..e303a790b
--- /dev/null
+++ b/src/test/ui/duplicate/dupe-symbols-2.rs
@@ -0,0 +1,18 @@
+// build-fail
+
+//
+#![crate_type="rlib"]
+#![allow(warnings)]
+
+pub mod a {
+ #[no_mangle]
+ pub extern "C" fn fail() {
+ }
+}
+
+pub mod b {
+ #[no_mangle]
+ pub extern "C" fn fail() {
+ //~^ symbol `fail` is already defined
+ }
+}