mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
When pointing at each step of cycle errors, do not include the code snippet when the note points at the same place as the previous one (by setting the note's span to DUMMY_SP).
26 lines
1.2 KiB
Plaintext
26 lines
1.2 KiB
Plaintext
error[E0391]: cycle detected when checking if `FOO` is a trivial const
|
|
--> $DIR/recursive-const-stack-overflow.rs:3:1
|
|
|
|
|
LL | const FOO: usize = FOO;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: ...which requires building MIR for `FOO`...
|
|
= note: ...which again requires checking if `FOO` is a trivial const, completing the cycle
|
|
= note: cycle used when simplifying constant for the type system `FOO`
|
|
= note: for more information, see <https://rustc-dev-guide.rust-lang.org/overview.html#queries> and <https://rustc-dev-guide.rust-lang.org/query.html>
|
|
|
|
error[E0391]: cycle detected when checking if `main::BAR` is a trivial const
|
|
--> $DIR/recursive-const-stack-overflow.rs:8:9
|
|
|
|
|
LL | const BAR: usize = BAR;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: ...which requires building MIR for `main::BAR`...
|
|
= note: ...which again requires checking if `main::BAR` is a trivial const, completing the cycle
|
|
= note: cycle used when simplifying constant for the type system `main::BAR`
|
|
= note: for more information, see <https://rustc-dev-guide.rust-lang.org/overview.html#queries> and <https://rustc-dev-guide.rust-lang.org/query.html>
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0391`.
|