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

Support pointwise addition for arrays and tuples #343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Mar 20, 2024

  1. Support pointwise addition for arrays and tuples

    Fixes JelteF#342
    
    We want to support examples like these:
    
    ```rust
    struct StructRecursive {
        a: i32,
        b: [i32; 2],
        c: [[i32; 2]; 3],
        d: (i32, i32),
        e: ((u8, [i32; 3]), i32),
        f: ((u8, i32), (u8, ((i32, u64, ((u8, u8), u16)), u8))),
        g: i32,
    }
    
    struct TupleRecursive((i32, u8), [(i32, u8); 10]);
    ```
    
    Supporting arrays and tuples inside of enums would also be useful, but
    that's not in this PR.
    matthiasgoergens committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    9250753 View commit details
    Browse the repository at this point in the history
  2. Alternative implementation

    This alternative implementation uses iterators and vectors, but does not
    require `Copy`.
    matthiasgoergens committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    ad97466 View commit details
    Browse the repository at this point in the history