2017-12-10 19:47:55 +00:00
|
|
|
error[E0435]: attempt to use a non-constant value in a constant
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/non-constant-expr-for-arr-len.rs:5:22
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2020-12-13 15:40:59 +00:00
|
|
|
LL | fn bar(n: usize) {
|
2021-01-08 00:44:08 +00:00
|
|
|
| - this would need to be a `const`
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let _x = [0; n];
|
2021-01-08 00:44:08 +00:00
|
|
|
| ^
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0435`.
|