2020-09-07 17:30:38 +02:00
|
|
|
error[E0391]: cycle detected when const-evaluating + checking `a`
|
2020-06-13 13:55:01 +02:00
|
|
|
--> $DIR/infinite-recursion-const-fn.rs:3:1
|
2018-01-16 10:15:41 +01:00
|
|
|
|
|
2020-09-07 17:30:38 +02:00
|
|
|
LL | const fn a() -> usize {
|
2020-06-13 13:55:01 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2019-11-11 14:32:36 +00:00
|
|
|
|
|
2020-09-07 17:30:38 +02:00
|
|
|
note: ...which requires const-evaluating + checking `b`...
|
|
|
|
--> $DIR/infinite-recursion-const-fn.rs:7:1
|
2019-11-11 14:32:36 +00:00
|
|
|
|
|
2020-09-07 17:30:38 +02:00
|
|
|
LL | const fn b() -> usize {
|
2020-06-13 13:55:01 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2020-09-07 17:30:38 +02:00
|
|
|
= note: ...which again requires const-evaluating + checking `a`, completing the cycle
|
2020-08-31 18:11:44 +01:00
|
|
|
note: cycle used when const-evaluating + checking `ARR::{constant#0}`
|
2020-09-07 17:30:38 +02:00
|
|
|
--> $DIR/infinite-recursion-const-fn.rs:10:18
|
2019-11-11 14:32:36 +00:00
|
|
|
|
|
2018-08-26 15:19:34 +02:00
|
|
|
LL | const ARR: [i32; a()] = [5; 6];
|
2019-11-11 14:32:36 +00:00
|
|
|
| ^^^
|
2018-01-16 10:15:41 +01:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2019-11-11 14:32:36 +00:00
|
|
|
For more information about this error, try `rustc --explain E0391`.
|