Files
rust/compiler
Jacob Pratt 3b4c17915e Rollup merge of #154377 - mu001999-contrib:fix/dead-code, r=TaKO8Ki
Fix `#[expect(dead_code)]` liveness propagation

Fixes https://github.com/rust-lang/rust/issues/154324
Fixes https://github.com/rust-lang/rust/issues/152370 (cc @eggyal)

Previously, when traversing from a `ComesFromAllowExpect::Yes` item (i.e., with `#[allow(dead_code)]` or `#[expect(dead_code)]`), other `ComesFromAllowExpect::Yes` items reached during propagation would be updated to `ComesFromAllowExpect::No` and inserted into `live_symbols`. That caused `dead_code` lint couldn't be emitted correctly.

After this PR, `ComesFromAllowExpect::Yes` items no longer incorrectly update other `ComesFromAllowExpect::Yes` items during propagation or mark them live by mistake, then `dead_code` lint could behave as expected.
2026-04-21 08:22:16 -04:00
..
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-15 13:50:43 +02:00
2026-04-20 00:18:28 +08:00
2026-04-16 19:30:56 -04:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-08 21:09:07 +02:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00