DST leads to unintuitive errors with traits like Int
#16874
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-DSTs
Area: Dynamically-sized types (DSTs)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The
Int
trait has a very similar name to theint
primitive type, so if someone accidentally usesInt
(e.g. forgetting that primitive types have special names/if they come from Haskell or some such) they can get confusing messages, especially now that DST allows for bare traits to be used more often, e.g.gives
which is really confusing.
I'm not really sure how we fix this, but mentioning "trait" somewhere in the message would be helpful.
The text was updated successfully, but these errors were encountered: