about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/crashes/ice-11939.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/crashes/ice-11939.rs b/tests/ui/crashes/ice-11939.rs
new file mode 100644
index 00000000000..5e7193b6826
--- /dev/null
+++ b/tests/ui/crashes/ice-11939.rs
@@ -0,0 +1,14 @@
+#![allow(clippy::unit_arg, clippy::no_effect)]
+
+const fn v(_: ()) {}
+
+fn main() {
+    if true {
+        v({
+            [0; 1 + 1];
+        });
+        Some(())
+    } else {
+        None
+    };
+}