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

Merging impls to be exhaustive #26

Open
lcnr opened this issue Mar 23, 2022 · 0 comments
Open

Merging impls to be exhaustive #26

lcnr opened this issue Mar 23, 2022 · 0 comments
Labels
A-param-types Const parameter types A-unification Unifying constants in the type system C-design-docs Category: This is part of our design documentation K-behavior Document Kind: regarding user visible behavior P-optional Priority: not strictly required S-blocked

Comments

@lcnr
Copy link
Contributor

lcnr commented Mar 23, 2022

What is this

This is a design document for const generics. Any discussions about its content should be on zulip. The conclusions of these discussions should then be edited back into this issue. Please do not post any comments directly in this issue.

Content

Whether we want to be able to unify different partial impls to consider them exhaustive.

trait ForBool<const B: bool> {}

impl ForBool<true> for u8 {}
impl ForBool<false> for u8 {}
// Does `for<const B: bool> u8: ForBool<B>` hold?
@lcnr lcnr added C-design-docs Category: This is part of our design documentation A-const-param-types K-behavior Document Kind: regarding user visible behavior P-optional Priority: not strictly required labels Mar 23, 2022
@rust-lang rust-lang locked and limited conversation to collaborators Mar 23, 2022
@lcnr lcnr added S-blocked A-param-types Const parameter types A-unification Unifying constants in the type system and removed A-const-param-types labels Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-param-types Const parameter types A-unification Unifying constants in the type system C-design-docs Category: This is part of our design documentation K-behavior Document Kind: regarding user visible behavior P-optional Priority: not strictly required S-blocked
Projects
None yet
Development

No branches or pull requests

1 participant