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

Implement unification of const abstract impls #104803

Closed
wants to merge 1 commit into from

Commits on Aug 1, 2023

  1. Implement unification of const abstract impls

    If two impls cover the entire set of possibilities:
    
    i.e.
    ```
    impl TraitName for Struct<true> {}
    impl TraitName for Struct<false> {}
    ```
    Then it would be expected that:
    ```
    ... <const N: usize> ... where Struct<{N > 1}>: TraitName {
    ```
    Should compile.
    This allows for such by generating a pseudo-impl for
    conditions which are exhaustive.
    
    Since these impls will never be instantiated as is, it is fine to have a fake impl.
    
    For now, this checks for a single bool condition, and whether both bool implementations are
    present.
    
    Change some of the api surface
    
    This adds separate functionality for checking for recursive traits versus exhaustive traits.
    But is still a WIP.
    JulianKnodt committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    1a27a84 View commit details
    Browse the repository at this point in the history