-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explict kind declarations on types #3890
Labels
A-typesystem
Area: The type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
that rule would make it the same as haskell's "deriving", no? My gut says it's nicer to have it automatically derive and have these as optional -- haskell gets by, but I think it's more often in rust that we rely on satisfying the inherent kinds. |
Yes, it would be deriving, which is something we are adding for other purposes anyway. |
These traits are automatically inferred by the compiler now. |
calebcartwright
added a commit
to calebcartwright/rust
that referenced
this issue
Oct 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-typesystem
Area: The type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
It's happened to me several times that I've known that a type needed to be
Send
orConst
, but I didn't find out until after I had already defined it and tried to use it with aSend
orConst
type parameter that it wasn`t the right kind.Something like this would maybe help:
It would basically not do anything except generate an error if it doesn't type check. I might actually prefer that even the kind traits must be declared explicitly.
The text was updated successfully, but these errors were encountered: