-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Permit unused generic const parameters in type definitions #60047
Comments
Technically we could do this with |
Related: #59875 |
@cramertj We can do it sensibly for all type parameters by assuming that |
@Centril sorry, that's a different thing-- that's assuming a variance. I'm talking about allowing it where we don't have to assume a variance because variance can't matter. |
But variance is not the only thing determined by how the type parameter is used, it also affects dropck, auto traits, and possibly more that I'm forgetting right now. So |
Good point! :) |
Make const parameters enforce no variance constraints Fixes #60047. Also includes some minor const refactoring for convenience.
should compile, as there are no variance issues with respect to const parameters. (See #44580 (comment).)
The text was updated successfully, but these errors were encountered: