mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 17:36:20 +00:00
point at closure return expression in non-`FnOnce` E0271 errors when a closure literal is passed as a function argument and E0271 fires for a projection that isnt `FnOnceOutput`. the error now points at the closures return expression and labels the closure declaration with "this closure". mirroring the existing FnOnce handling in `maybe_detailed_projection_msg`. which cant recover the closure from `self_ty` alone. fixes https://github.com/rust-lang/rust/issues/42390 r? @estebank