-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
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-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-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-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
Description
Currently, queries are inconsistently documented. Some have a doc-comment:
rust/compiler/rustc_middle/src/query/mod.rs
Lines 38 to 44 in b0f3940
/// Return the span for a definition. | |
/// Contrary to `def_span` below, this query returns the full absolute span of the definition. | |
/// This span is meant for dep-tracking rather than diagnostics. It should not be used outside | |
/// of rustc_middle::hir::source_map. | |
query source_span(key: LocalDefId) -> Span { | |
desc { "getting the source span" } | |
} |
while others only have the
desc
we mandate in the proc-macro: rust/compiler/rustc_middle/src/query/mod.rs
Lines 26 to 30 in b0f3940
query resolutions(_: ()) -> &'tcx ty::ResolverGlobalCtxt { | |
eval_always | |
no_hash | |
desc { "getting the resolver outputs" } | |
} |
We should add documentation for all of these, then add
#[warn(missing_docs)]
so it doesn't regress in the future.Noratrieb
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-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-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-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.