]> git.lizzy.rs Git - rust.git/commit
Fix `boxed_local` suggestion
authorMichael Wright <mikerite@lavabit.com>
Thu, 21 Feb 2019 04:59:10 +0000 (06:59 +0200)
committerMichael Wright <mikerite@lavabit.com>
Thu, 21 Feb 2019 04:59:10 +0000 (06:59 +0200)
commit9d6ecc74850148e0eee2304f9a90ebb199e14c0f
tree883e64f0b6b25a8b7ca07682b3d20af2e2dab4bd
parent027dde92e22b9058c2bd6efa4b3e47b78d991dc7
Fix `boxed_local` suggestion

Don't warn about an argument that is moved into a closure.

ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.

Fixes #3739
clippy_lints/src/escape.rs
tests/ui/escape_analysis.rs
tests/ui/escape_analysis.stderr