2021-12-10 01:10:05 +08:00
|
|
|
error[E0015]: cannot call non-const fn `f` in constants
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/const-call.rs:6:17
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let _ = [0; f(2)];
|
|
|
|
| ^^^^
|
2021-12-10 01:10:05 +08:00
|
|
|
|
|
|
|
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-11-06 21:27:05 +05:30
|
|
|
error: aborting due to previous error
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-11-06 21:27:05 +05:30
|
|
|
For more information about this error, try `rustc --explain E0015`.
|