about summary refs log tree commit diff
path: root/tests/ui/inline-const
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-09 22:16:51 +0000
committerMichael Goulet <michael@errs.io>2025-01-09 22:16:51 +0000
commit9d2e1ed6bd86047f724c8bde4f79561024d13fb8 (patch)
tree31f0fc4ef6a8dded882e1e0b28fbefd541177caa /tests/ui/inline-const
parent824759493246ee383beb9cd5ceffa0e15deb9fa4 (diff)
downloadrust-9d2e1ed6bd86047f724c8bde4f79561024d13fb8.tar.gz
rust-9d2e1ed6bd86047f724c8bde4f79561024d13fb8.zip
Make sure to walk into nested const blocks in RegionResolutionVisitor
Diffstat (limited to 'tests/ui/inline-const')
-rw-r--r--tests/ui/inline-const/collect-scopes-in-pat.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/inline-const/collect-scopes-in-pat.rs b/tests/ui/inline-const/collect-scopes-in-pat.rs
new file mode 100644
index 00000000000..024fde53741
--- /dev/null
+++ b/tests/ui/inline-const/collect-scopes-in-pat.rs
@@ -0,0 +1,16 @@
+// @compile-flags: -Zlint-mir
+//@ check-pass
+
+#![feature(inline_const_pat)]
+
+fn main() {
+    match 1 {
+        const {
+            || match 0 {
+                x => 0,
+            };
+            0
+        } => (),
+        _ => (),
+    }
+}