unused_mut lint improvement: warn when variable only copied into closure #47128
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Minimal example of the lint failure to fire:
foo
unconditionally returns false, but the top-level binding ofres
doesn't get anunused_mut
warning.The text was updated successfully, but these errors were encountered: