Skip to content
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

Add rationale for rustc_type_ir behind allowing rustc::potential-query-instability lint #131318

Open
ismailarilik opened this issue Oct 6, 2024 · 2 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ismailarilik
Copy link
Contributor

ismailarilik commented Oct 6, 2024

Context: #84447

Motivation:

  1. 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
  2. This would prevent further fix attempts so wastes of time as well.
  3. 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.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 6, 2024
@ismailarilik
Copy link
Contributor Author

@rustbot label C-cleanup T-compiler

@rustbot rustbot added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 6, 2024
@compiler-errors
Copy link
Member

It would be nice if you actually linked the specific callsites where this lint is triggering in the crate.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants