File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ compile-flags: -Z threads=2
2+ //@ check-fail
3+
4+ const FOO : usize = FOO ; //~ERROR `main` function not found in crate `cycle_crash
5+ //~^ cycle detected when simplifying constant for the type system `FOO`
Original file line number Diff line number Diff line change 1+ error[E0601]: `main` function not found in crate `cycle_crash`
2+ --> $DIR/cycle_crash.rs:4:24
3+ |
4+ LL | const FOO: usize = FOO;
5+ | ^ consider adding a `main` function to `$DIR/cycle_crash.rs`
6+
7+ error[E0391]: cycle detected when simplifying constant for the type system `FOO`
8+ --> $DIR/cycle_crash.rs:4:1
9+ |
10+ LL | const FOO: usize = FOO;
11+ | ^^^^^^^^^^^^^^^^
12+ |
13+ note: ...which requires const-evaluating + checking `FOO`...
14+ --> $DIR/cycle_crash.rs:4:20
15+ |
16+ LL | const FOO: usize = FOO;
17+ | ^^^
18+ = note: ...which again requires simplifying constant for the type system `FOO`, completing the cycle
19+ = note: cycle used when running analysis passes on this crate
20+ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
21+
22+ error: aborting due to 2 previous errors
23+
24+ Some errors have detailed explanations: E0391, E0601.
25+ For more information about an error, try `rustc --explain E0391`.
You can’t perform that action at this time.
0 commit comments