Suggestion for adding a type parameter happens a little too often. #70365
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code now emits a suggestion to add a type parameter (since #68447 in 1.42):
Emits:
The suggestion to add
<PathBuf>
is clearly wrong (in my eyes), and I feel like I am seeing this suggestion a lot.Perhaps, if there is already a "possible candidate import" suggestion, it could skip the suggestion to add a type parameter? Or maybe some other heuristic to dial back how often it shows up?
(BTW, it is a great suggestion when it applies, but more often than not I'm getting a wrong hint.)
The text was updated successfully, but these errors were encountered: