-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Add more robust handling of nested query cycles #154389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing for ICE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,21 @@ | ||
| error[E0391]: cycle detected when looking up span for `Default` | ||
| error: internal compiler error: query cycle when printing cycle detected | ||
| | | ||
| = note: ...which immediately requires looking up span for `Default` again | ||
| = note: cycle used when perform lints prior to AST lowering | ||
| = note: ...when getting HIR ID of `Default` | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which requires looking up span for `Default`... | ||
| = note: ...which again requires getting HIR ID of `Default`, completing the cycle | ||
| = note: cycle used when getting the resolver for lowering | ||
| = 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 | ||
|
|
||
| error: aborting due to 1 previous error | ||
| error[E0391]: cycle detected when getting the resolver for lowering | ||
| | | ||
| = note: ...which requires getting HIR ID of `Default`... | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which again requires getting the resolver for lowering, completing the cycle | ||
| = 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 | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0391`. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing for ICE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,21 @@ | ||
| error[E0391]: cycle detected when looking up span for `Default` | ||
| error: internal compiler error: query cycle when printing cycle detected | ||
| | | ||
| = note: ...which immediately requires looking up span for `Default` again | ||
| = note: cycle used when perform lints prior to AST lowering | ||
| = note: ...when getting HIR ID of `Default` | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which requires looking up span for `Default`... | ||
| = note: ...which again requires getting HIR ID of `Default`, completing the cycle | ||
| = note: cycle used when getting the resolver for lowering | ||
| = 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 | ||
|
|
||
| error: aborting due to 1 previous error | ||
| error[E0391]: cycle detected when getting the resolver for lowering | ||
| | | ||
| = note: ...which requires getting HIR ID of `Default`... | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which again requires getting the resolver for lowering, completing the cycle | ||
| = 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 | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0391`. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't be testing for ICEs, but fixing them instead. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,21 @@ | ||
| error[E0391]: cycle detected when looking up span for `Default` | ||
| error: internal compiler error: query cycle when printing cycle detected | ||
| | | ||
| = note: ...which immediately requires looking up span for `Default` again | ||
| = note: cycle used when perform lints prior to AST lowering | ||
| = note: ...when getting HIR ID of `Default` | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which requires looking up span for `Default`... | ||
| = note: ...which again requires getting HIR ID of `Default`, completing the cycle | ||
| = note: cycle used when getting the resolver for lowering | ||
| = 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 | ||
|
|
||
| error: aborting due to 1 previous error | ||
| error[E0391]: cycle detected when getting the resolver for lowering | ||
| | | ||
| = note: ...which requires getting HIR ID of `Default`... | ||
| = note: ...which requires getting the crate HIR... | ||
| = note: ...which requires perform lints prior to AST lowering... | ||
| = note: ...which again requires getting the resolver for lowering, completing the cycle | ||
| = 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 | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0391`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call
handle_cyclefunction inwait_for_queryafter breaking and resuming from one or multiple query cycles. As such this might race with otherhandle_cyclecalls which wouldn't be a "nested" query cycles.