Add rationale for `rustc_type_ir` behind allowing rustc::potential-query-instability lint
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Context: https://github.com/rust-lang/rust/issues/84447
Motivation:
- This lint asks to do so. An example:
error: using `values` can result in unstable query results --> compiler/rustc_query_system/src/dep_graph/serialized.rs:654:50 | 654 | let mut stats: Vec<_> = record_stats.values().collect(); | ^^^^^^ | = note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale - This would prevent further fix attempts so wastes of time as well.
- Nearly all of those allowances has a comment which explains the rationale.
To do: Add a comment explaning the rationale behind allowing rustc::potential-query-instability lint for all occurrences in the file compiler/rustc_type_ir/src/search_graph/mod.rs. You can find the places where this lint is triggered by searching with #[allow(rustc::potential_query_instability)] in this file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open compiler/rustc_type_ir/src/search_graph/mod.rs and search for #[allow(rustc::potential_query_instability)] to locate every occurrence. Read the surrounding code and existing comments to understand each allowance, then add a rationale comment for each one. Done means all occurrences in the file explain why the allowance is intentional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100