]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow...
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 28 Jan 2023 04:20:18 +0000 (05:20 +0100)
committerGitHub <noreply@github.com>
Sat, 28 Jan 2023 04:20:18 +0000 (05:20 +0100)
Correct suggestions for closure arguments that need a borrow

Fixes #107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just `&` when we expected `&mut _` in a closure arg

1  2 
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs