Closed
Description
When using RUSTC_LOG
to debug building rustc itself, I ran into this error:
error[E0391]: cycle detected when processing `hir::def::<impl at src/librustc/hir/def.rs:255:1: 270:2>::present_items::{{opaque}}#0`
--> src/librustc/hir/def.rs:262:35
|
262 | pub fn present_items(self) -> impl Iterator<Item=T> {
| ^^^^^^^^^^^^^^^^^^^^^
| |
| in this expansion of `desugaring of `existential type``
| in this macro invocation
|
note: ...which requires processing `hir::def::<impl at src/librustc/hir/def.rs:255:1: 270:2>::present_items::{{opaque}}#0`...
--> src/librustc/hir/def.rs:262:35
|
262 | pub fn present_items(self) -> impl Iterator<Item=T> {
| ^^^^^^^^^^^^^^^^^^^^^
| |
| in this expansion of `desugaring of `existential type``
| in this macro invocation
note: ...which requires processing `hir::def::<impl at src/librustc/hir/def.rs:255:1: 270:2>::present_items::{{opaque}}#0`...
--> src/librustc/hir/def.rs:262:35
|
262 | pub fn present_items(self) -> impl Iterator<Item=T> {
| ^^^^^^^^^^^^^^^^^^^^^
| |
| in this expansion of `desugaring of `existential type``
| in this macro invocation
= note: ...which again requires processing `hir::def::<impl at src/librustc/hir/def.rs:255:1: 270:2>::present_items::{{opaque}}#0`, completing the cycle
note: cycle used when processing `hir::def::<impl at src/librustc/hir/def.rs:255:1: 270:2>::present_items`
--> src/librustc/hir/def.rs:262:5
|
262 | pub fn present_items(self) -> impl Iterator<Item=T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Repro:
- Set
debug = true
inconfig.toml
. ./x.py build
to get a debug compiler (and go through several steps in stage 1 we want to skip).touch src/librustc/lib.rs
RUSTC_LOG=rustc::ty=debug ./x.py build --stage=1 --keep-stage=0 > dlog 2>&1
The last step should rebuild librustc using a compiler with debugging enabled. I imagine there is a faster way to do this, but these are the simplest instructions I could think of.
Is this known/expected? I have no idea what the error means, but it makes debugging more difficult.
Currently on master (7cdaffd).