about summary refs log tree commit diff
path: root/tests/ui/macros/cfg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/cfg.rs')
-rw-r--r--tests/ui/macros/cfg.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/macros/cfg.rs b/tests/ui/macros/cfg.rs
new file mode 100644
index 00000000000..2aac50a9d01
--- /dev/null
+++ b/tests/ui/macros/cfg.rs
@@ -0,0 +1,6 @@
+fn main() {
+    cfg!(); //~ ERROR macro requires a cfg-pattern
+    cfg!(123); //~ ERROR expected identifier
+    cfg!(foo = 123); //~ ERROR literal in `cfg` predicate value must be a string
+    cfg!(foo, bar); //~ ERROR expected 1 cfg-pattern
+}