Suggest borrowing parameter into function with generic argument where a matching impl is found #84973
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: Rust Playground
The current output is:
Not really sure about the precise wording, but the
help
section should suggest borrowingf
when passing it toOther::new(f)
as rustc has figured out that there is animpl
that just differs by the ownership.The output is the same on Nightly.
The text was updated successfully, but these errors were encountered: