Files
rust/compiler/rustc_borrowck
Jonathan Brouwer 9b2b299841 Rollup merge of #154674 - Enselic:unused-outlive, r=jdonszelmann
borrowck: Don't mention unused vars in closure outlive errors

When there is a closure arg lifetime error, the code does its best to find variables that correspond to the lifetimes involved. This commit stops mentioning arguments that are unused in closures, since they are not relevant. This removes the "red herring" of rust-lang/rust#113121.

The `user_arg_index` nomenclature can be applied more broadly, but then the diff becomes annoyingly big, so I chose not to do that.

Review each commit individually for a nicer experience.
2026-04-05 10:05:18 +02:00
..