summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const_let_irrefutable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const_let_irrefutable.rs')
-rw-r--r--tests/ui/consts/const_let_irrefutable.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/consts/const_let_irrefutable.rs b/tests/ui/consts/const_let_irrefutable.rs
new file mode 100644
index 000000000..e889abf4a
--- /dev/null
+++ b/tests/ui/consts/const_let_irrefutable.rs
@@ -0,0 +1,11 @@
+// build-pass (FIXME(62277): could be check-pass?)
+
+fn main() {}
+
+const fn tup((a, b): (i32, i32)) -> i32 {
+ a + b
+}
+
+const fn array([a, b]: [i32; 2]) -> i32 {
+ a + b
+}