1
Fork 0
rust/src/test/ui/infinite/infinite-recursion-const-fn.stderr

22 lines
727 B
Text
Raw Normal View History

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
| ^^^^^^^^^^^^^^^^^^^^^
|
2020-09-07 17:30:38 +02:00
note: ...which requires const-evaluating + checking `b`...
--> $DIR/infinite-recursion-const-fn.rs:7:1
|
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
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
|
LL | const ARR: [i32; a()] = [5; 6];
| ^^^
2018-01-16 10:15:41 +01:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`.