summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/allow-at-crate-level.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/check-cfg/allow-at-crate-level.rs')
-rw-r--r--tests/ui/check-cfg/allow-at-crate-level.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/check-cfg/allow-at-crate-level.rs b/tests/ui/check-cfg/allow-at-crate-level.rs
new file mode 100644
index 000000000..ce3383a29
--- /dev/null
+++ b/tests/ui/check-cfg/allow-at-crate-level.rs
@@ -0,0 +1,8 @@
+// This test check that #![allow(unexpected_cfgs)] works with --cfg
+//
+// check-pass
+// compile-flags: --cfg=unexpected --check-cfg=names() -Z unstable-options
+
+#![allow(unexpected_cfgs)]
+
+fn main() {}