]> git.lizzy.rs Git - rust.git/commit
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)
commitfa2cd945af6bfb14c16cfaa8b74c636dfb821b48
treef076f9f83877cd9f6e9008c9353978a0e234a0f2
parent260e04879ee52a768a66ad131c7bd1b56526e609
parentb83ab0ce965356308921acabe8a40fe88bcdd8c7
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow, r=oli-obk

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
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs