Skip to content

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

Open
@nikomatsakis

Description

@nikomatsakis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions