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

[move-enums] Add mut in patterns for mutable bindings #15795

Merged
merged 3 commits into from
Feb 5, 2024

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    00ad32c View commit details
    Browse the repository at this point in the history
  2. [move-enums] Ellipsis patterns (#15872)

    ## Description 
    
    Add support for ellipsis patterns in both enum and struct patterns. 
    
    Ellipsis patterns are supported in both named and positional patterns.
    1. Only one ellipsis pattern may be present (both in positional and
    named patterns).
    2. An ellipsis pattern corresponds to zero or more arguments.
    3. Ellipsis patterns are only valid as field patterns, and cannot occur
    as a top-level pattern.
    
    Some examples of valid patterns (for both struct and enum variant
    patterns):
    
    ```
    C(..)
    C(x, ..)
    C(x, .., y)
    C(.., x)
    
    N { x, .. }
    N { x, y, .. }
    N { .., x }
    N { .. }
    ```
    
    Some invalid patterns:
    
    ```
    C(.., ..)
    C(x, .., y, ..)
    C(..) // if C is a named variant or does not have any parameters
    
    N { .., .. }
    N { .. } // If N is a positional/empty variant
    ```
    
    ## Test Plan 
    
    Added additional positive and negative tests.
    
    ---
    If your changes are not user-facing and do not break anything, you can
    skip the following section. Otherwise, please briefly describe what has
    changed under the Release Notes section.
    
    ### Type of Change (Check all that apply)
    
    - [ ] protocol change
    - [ ] user-visible impact
    - [ ] breaking change for a client SDKs
    - [ ] breaking change for FNs (FN binary must upgrade)
    - [ ] breaking change for validators or node operators (must upgrade
    binaries)
    - [ ] breaking change for on-chain data layout
    - [ ] necessitate either a data wipe or data migration
    
    ### Release notes
    tzakian committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    e2a650d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d1c1ba9 View commit details
    Browse the repository at this point in the history