rust/compiler/rustc_mir_transform
Jacob Pratt c9a7f8afa9
Rollup merge of #152103 - eggyal:caught-divergence-not-unused, r=cjgillot
Consider captures to be used by closures that unwind

Assignments to a captured variable within a diverging closure should not be considered unused if the divergence is caught.

This patch considers such assignments/captures to be used by diverging closures irrespective of whether the divergence is caught, but better a false negative unused lint than a false positive one (the latter having caused a stable-to-stable regression).

Fixes rust-lang/rust#152079
r? compiler
2026-02-16 04:28:57 -05:00
..
src Rollup merge of #152103 - eggyal:caught-divergence-not-unused, r=cjgillot 2026-02-16 04:28:57 -05:00
Cargo.toml Convert to inline diagnostics in rustc_mir_transform 2026-02-04 18:29:47 +01:00