about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-pattern-complexity.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-03 14:01:47 +0000
committerbors <bors@rust-lang.org>2024-03-03 14:01:47 +0000
commit26907374b9478d84d766aea85b10b51af8dbcce8 (patch)
treebe19b487d32e4a2a022f3bde10e3b36aa61e1630 /tests/ui/feature-gates/feature-gate-pattern-complexity.rs
parent9e73597e5a83e96e223c10b3810566c74a86a0c1 (diff)
parente634a0a51b088bd8df4e07d2f2666daabb01e338 (diff)
downloadrust-26907374b9478d84d766aea85b10b51af8dbcce8.tar.gz
rust-26907374b9478d84d766aea85b10b51af8dbcce8.zip
Auto merge of #121937 - GuillaumeGomez:rollup-9684vg3, r=GuillaumeGomez
Rollup of 3 pull requests

Successful merges:

 - #121917 (Add new `pattern_complexity` attribute to add possibility to limit and check recursion in pattern matching)
 - #121933 (Add missing get_name for wasm::thread.)
 - #121934 (rustc_log: expose tracing-tree "wraparound" in an env var)

r? `@ghost`
`@rustbot` modify labels: rollup
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() {}