We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 495d8ed commit 96c37c8Copy full SHA for 96c37c8
src/test/ui/consts/issue-90878-3.rs
@@ -0,0 +1,6 @@
1
+
2
+fn main() {
3
+ |x: usize| [0; x]; //~ ERROR attempt to use a non-constant value in a constant [E0435]
4
+ // (note the newline before "fn")
5
+}
6
+// ignore-tidy-leading-newlines
src/test/ui/consts/issue-90878-3.stderr
@@ -0,0 +1,11 @@
+error[E0435]: attempt to use a non-constant value in a constant
+ --> $DIR/issue-90878-3.rs:3:20
+ |
+LL | |x: usize| [0; x];
+ | - ^
+ | |
7
+ | this would need to be a `const`
8
9
+error: aborting due to previous error
10
11
+For more information about this error, try `rustc --explain E0435`.
0 commit comments