Skip to content
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

document when the values of default type parameters are checked for wf and other conditions #636

Open
nikomatsakis opened this issue Jul 11, 2019 · 0 comments
Labels
A-types Area: Types

Comments

@nikomatsakis
Copy link
Contributor

In rust-lang/rust#61631 there is significant confusion concerning when the default value for a type parameter should be checked for consistency. I left a comment here explaining the rule that we arrived at (with some links for more details) -- the short version is that if you have struct Foo<A, B = Default>, then the type Default is only checked for WF and so forth if it does not contain any other parameters (e.g., A). I don't think this rule is in the reference but we should write it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-types Area: Types
Projects
None yet
Development

No branches or pull requests

1 participant