summaryrefslogtreecommitdiffstats
path: root/src/test/ui/allocator/two-allocators.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/allocator/two-allocators.rs')
-rw-r--r--src/test/ui/allocator/two-allocators.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/allocator/two-allocators.rs b/src/test/ui/allocator/two-allocators.rs
new file mode 100644
index 000000000..aa1291e77
--- /dev/null
+++ b/src/test/ui/allocator/two-allocators.rs
@@ -0,0 +1,9 @@
+use std::alloc::System;
+
+#[global_allocator]
+static A: System = System;
+#[global_allocator]
+static B: System = System;
+//~^ ERROR: cannot define multiple global allocators
+
+fn main() {}