summaryrefslogtreecommitdiffstats
path: root/src/test/ui/check-cfg/empty-names.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/check-cfg/empty-names.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/check-cfg/empty-names.rs b/src/test/ui/check-cfg/empty-names.rs
new file mode 100644
index 000000000..046ff0364
--- /dev/null
+++ b/src/test/ui/check-cfg/empty-names.rs
@@ -0,0 +1,10 @@
+// Check warning for unexpected cfg
+//
+// check-pass
+// compile-flags: --check-cfg=names() -Z unstable-options
+
+#[cfg(unknown_key = "value")]
+//~^ WARNING unexpected `cfg` condition name
+pub fn f() {}
+
+fn main() {}