summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-90878.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-90878.rs')
-rw-r--r--tests/ui/consts/issue-90878.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-90878.rs b/tests/ui/consts/issue-90878.rs
new file mode 100644
index 000000000..43f6fe5f3
--- /dev/null
+++ b/tests/ui/consts/issue-90878.rs
@@ -0,0 +1,4 @@
+ fn main() {
+ |x: usize| [0; x]; //~ ERROR attempt to use a non-constant value in a constant [E0435]
+ // (note the space before "fn")
+}