Add rustc lint, warning when iterating over hashmaps #89558
Conversation
|
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
| @@ -0,0 +1,39 @@ | |||
| error: using `drain` can result in unstable query results | |||
The lint looks useful in general for end users (I'm sure it's already in clippy). It'd be nice if we uplifted it someday.
|
@bors r+ We don't need to mark the |
|
|
|
@bors r- somehow CI doesn't run at all for this PR and this lint causes a lot of warnings which is why i've opened rust-lang/compiler-team#465 for this.
The |
|
@lcnr |
This comment has been hidden.
This comment has been hidden.
|
Should we wait for the FCP to complete on rust-lang/compiler-team#465, or at least for the MCP to be announced in the t-compiler meeting ? (not that they would be controversial, of course; just opportunities for discussion and possible improvements) |
|
Bookkeeping: #84447 |
This comment has been hidden.
This comment has been hidden.
|
@petrochenkov renamed the lint to and explicitly allowed this lint in every crate that is affected. Fixing all warnings as part of this PR is a lot of work, especially as some of those warnings don't seems trivial to fix |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
|
this should be ready for merge now |
| @@ -830,6 +830,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
| self.tcx.type_of(def_id) | |||
| }; | |||
| let substs = self.infcx.fresh_substs_for_item(span, def_id); | |||
| self.write_substs(hir_id, substs); | |||
This change seems unrelated to the lint, right? It seems correct to do, I'm just surprised it was either not needed until now or exposed as needed in this PR.
|
We are allowing these in a lot of modules. Do we have plans to fix them at a later point? @bors r+ |
|
|
I am allowing these for all compiler crates rn and intend to slowly remove these crate in the future. |
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
…askrgr Rollup of 3 pull requests Successful merges: - rust-lang#85254 (Normalize MIR with RevealAll before optimizations.) - rust-lang#89558 (Add rustc lint, warning when iterating over hashmaps) - rust-lang#90205 (Repace use of `static_nobundle` with `native_link_modifiers` within Rust codebase) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#85254 (Normalize MIR with RevealAll before optimizations.) - rust-lang#89558 (Add rustc lint, warning when iterating over hashmaps) - rust-lang#90100 (Skip documentation for tier 2 targets on dist-x86_64-apple-darwin) - rust-lang#90155 (Fix alignment of method headings for scannability) - rust-lang#90205 (Repace use of `static_nobundle` with `native_link_modifiers` within Rust codebase) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#85254 (Normalize MIR with RevealAll before optimizations.) - rust-lang#89558 (Add rustc lint, warning when iterating over hashmaps) - rust-lang#90100 (Skip documentation for tier 2 targets on dist-x86_64-apple-darwin) - rust-lang#90155 (Fix alignment of method headings for scannability) - rust-lang#90162 (Mark `{array, slice}::{from_ref, from_mut}` as const fn) - rust-lang#90205 (Repace use of `static_nobundle` with `native_link_modifiers` within Rust codebase) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#89558 (Add rustc lint, warning when iterating over hashmaps) - rust-lang#90100 (Skip documentation for tier 2 targets on dist-x86_64-apple-darwin) - rust-lang#90155 (Fix alignment of method headings for scannability) - rust-lang#90162 (Mark `{array, slice}::{from_ref, from_mut}` as const fn) - rust-lang#90221 (Fix ICE when forgetting to `Box` a parameter to a `Self::func` call) - rust-lang#90234 (Temporarily turn overflow checks off for rustc-rayon-core) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup


r? rust-lang/wg-incr-comp
The text was updated successfully, but these errors were encountered: