-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Misleading cannot infer type for type parameter #93198
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code:
(playground link)
... the current output is:
This error message is a bit misleading in that it refers not to
Kfromtrait Store<K, V>, butKfrom theimpl<K> Store<...>(the compiler is not sure which kind ofHashMap<K, String>user wants).Maybe we could print something like this?