about summary refs log tree commit diff
path: root/tests/ui/allocator/function-allocator.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/allocator/function-allocator.rs')
-rw-r--r--tests/ui/allocator/function-allocator.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/allocator/function-allocator.rs b/tests/ui/allocator/function-allocator.rs
new file mode 100644
index 00000000000..d53f6e9b72e
--- /dev/null
+++ b/tests/ui/allocator/function-allocator.rs
@@ -0,0 +1,4 @@
+#[global_allocator]
+fn foo() {} //~ ERROR: allocators must be statics
+
+fn main() {}