mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
9b2b299841
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.