about summary refs log tree commit diff
path: root/tests/ui/inline-const/const-match-pat-inference.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/inline-const/const-match-pat-inference.rs')
-rw-r--r--tests/ui/inline-const/const-match-pat-inference.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/inline-const/const-match-pat-inference.rs b/tests/ui/inline-const/const-match-pat-inference.rs
new file mode 100644
index 00000000000..d83ae6e9834
--- /dev/null
+++ b/tests/ui/inline-const/const-match-pat-inference.rs
@@ -0,0 +1,12 @@
+// check-pass
+
+#![feature(inline_const_pat)]
+#![allow(incomplete_features)]
+
+fn main() {
+    match 1u64 {
+        0 => (),
+        const { 0 + 1 } => (),
+        const { 2 - 1 } ..= const { u64::MAX } => (),
+    }
+}