summaryrefslogtreecommitdiffstats
path: root/tests/ui/attributes/used_with_arg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/used_with_arg.rs')
-rw-r--r--tests/ui/attributes/used_with_arg.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/attributes/used_with_arg.rs b/tests/ui/attributes/used_with_arg.rs
new file mode 100644
index 000000000..ad80ff53f
--- /dev/null
+++ b/tests/ui/attributes/used_with_arg.rs
@@ -0,0 +1,19 @@
+#![feature(used_with_arg)]
+
+#[used(linker)]
+static mut USED_LINKER: [usize; 1] = [0];
+
+#[used(compiler)]
+static mut USED_COMPILER: [usize; 1] = [0];
+
+#[used(compiler)] //~ ERROR `used(compiler)` and `used(linker)` can't be used together
+#[used(linker)]
+static mut USED_COMPILER_LINKER2: [usize; 1] = [0];
+
+#[used(compiler)] //~ ERROR `used(compiler)` and `used(linker)` can't be used together
+#[used(linker)]
+#[used(compiler)]
+#[used(linker)]
+static mut USED_COMPILER_LINKER3: [usize; 1] = [0];
+
+fn main() {}