about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-pattern-complexity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-pattern-complexity.rs')
-rw-r--r--tests/ui/feature-gates/feature-gate-pattern-complexity.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-pattern-complexity.rs b/tests/ui/feature-gates/feature-gate-pattern-complexity.rs
new file mode 100644
index 00000000000..43e9a00c9a7
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-pattern-complexity.rs
@@ -0,0 +1,6 @@
+// check that `pattern_complexity` is feature-gated
+
+#![pattern_complexity = "42"]
+//~^ ERROR: the `#[pattern_complexity]` attribute is just used for rustc unit tests
+
+fn main() {}