rust/library/std
bors ff6dc928c5 Auto merge of #142390 - cjgillot:mir-liveness, r=davidtwco
Perform unused assignment and unused variables lints on MIR.

Rebase of https://github.com/rust-lang/rust/pull/101500

Fixes https://github.com/rust-lang/rust/issues/51003.

The first commit moves detection of uninhabited types from the current liveness pass to MIR building.

In order to keep the same level of diagnostics, I had to instrument MIR a little more:
- keep for which original local a guard local is created;
- store in the `VarBindingForm` the list of introducer places and whether this was a shorthand pattern.

I am not very proud of the handling of self-assignments. The proposed scheme is in two parts: first detect probable self-assignments, by pattern matching on MIR, and second treat them specially during dataflow analysis. I welcome ideas.

Please review carefully the changes in tests. There are many small changes to behaviour, and I'm not sure all of them are desirable.
2025-10-12 13:00:04 +00:00
..
benches Fix import in bench for wasm 2025-02-12 14:44:30 -08:00
src Auto merge of #142390 - cjgillot:mir-liveness, r=davidtwco 2025-10-12 13:00:04 +00:00
tests Implement non-poisoning Mutex::with_mut, RwLock::with and RwLock::with_mut 2025-10-04 17:16:00 +08:00
build.rs std: add support for armv7a-vex-v5 target 2025-09-24 12:10:15 -05:00
Cargo.toml Add a new wasm32-wasip3 target to Rust 2025-10-02 15:09:09 -07:00