-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
right now, new contributors to the compiler can be easily confused by the cycle error - queries are not common in other production compilers (that i know of) and i think it would make it a lot easier to understand if we linked to the docs: https://rustc-dev-guide.rust-lang.org/overview.html#queries / https://rustc-dev-guide.rust-lang.org/query.html
the error reporting has changed a bit since i last looked at it, but i think
rust/compiler/rustc_query_system/src/error.rs
Lines 46 to 60 in a7838d8
#[derive(Diagnostic)] | |
#[diag(query_system_cycle, code = "E0391")] | |
pub struct Cycle { | |
#[primary_span] | |
pub span: Span, | |
pub stack_bottom: String, | |
#[subdiagnostic] | |
pub cycle_stack: Vec<CycleStack>, | |
#[subdiagnostic] | |
pub stack_count: StackCount, | |
#[subdiagnostic] | |
pub alias: Option<Alias>, | |
#[subdiagnostic] | |
pub cycle_usage: Option<CycleUsage>, | |
} |
cc @jieyouxu
jieyouxu
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.