Do not suggest adding a type parameter on multi-letter types #70572
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
In the process of writing some code, I didn't import an enum, resulting in
The import suggestion is great, but suggesting the type parameter seems likely to be confusing (and IMO, is almost certainly wrong). My suggested heuristic is to avoid suggesting the type parameter if we suggest a candidate in another module, at least, and possibly even avoid suggesting it always if there's more than on letter. It also seems suprising to suggest the type parameter on the impl and not the (more local) function?
I can try to come up with a MCVE, but I suspect it's pretty simple and I wanted to just not forget about this.
The text was updated successfully, but these errors were encountered: