-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Handle rustc_query_system
cases of rustc::potential_query_instability
lint
#131200
base: master
Are you sure you want to change the base?
Handle rustc_query_system
cases of rustc::potential_query_instability
lint
#131200
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
@rustbot author |
062a42c
to
1c33630
Compare
1c33630
to
f34e703
Compare
@rustbot review |
Could you point to the place where each of these maps is iterated over? |
error: using `iter` can result in unstable query results
--> compiler/rustc_query_system/src/dep_graph/graph.rs:1392:44
|
1392 | if let Some((node, _)) = shard.iter().find(|(_, index)| **index == dep_node_index) {
| ^^^^
|
= note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale
= note: `-D rustc::potential-query-instability` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(rustc::potential_query_instability)]`
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
error: using `iter` can result in unstable query results
--> compiler/rustc_query_system/src/query/plumbing.rs:80:34
|
80 | for (k, v) in shard?.iter() {
| ^^^^
|
= note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale
error: using `keys` can result in unstable query results
--> compiler/rustc_query_system/src/query/job.rs:517:47
|
517 | let mut jobs: Vec<QueryJobId> = query_map.keys().cloned().collect();
| ^^^^
|
= note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale
error: using `iter` can result in unstable query results
--> compiler/rustc_query_system/src/query/caches.rs:62:33
|
62 | for (k, v) in shard.iter() {
| ^^^^
|
= note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale |
@ismailarilik that's not very helpful. The point is chosing for each map, what is the best course of action, between changing the type, and allowing the lint because the non-determinism does not show. For instance, at |
Addressed here: 870d7c2 |
In |
☔ The latest upstream changes (presumably #132282) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR removes
#![allow(rustc::potential_query_instability)]
line fromcompiler/rustc_query_system/src/lib.rs
and convertsFxHash{Map,Set}
types intoFxIndex{Map,Set}
to suppress lint errors.A somewhat tracking issue: #84447
r? @compiler-errors