Macros for concatenating const arrays.
To add to your Cargo.toml:
toml
array-concat = "0.5.2"
```rust use array_concat::*;
const A: [u32; 3] = [1, 2, 3]; const B: [u32; 2] = [4, 5]; const C: [u32; concatarrayssize!(A, B)] = concat_arrays!(A, B);
// Non-Copy struct
struct S(bool); const D: [S; 1] = [S(true)]; const E: [S; 1] = [S(false)]; const F: [S; concatarrayssize!(D, E)] = concat_arrays!(D, E);
fn main() { let c = concatarrays!(A, B); asserteq!([1, 2, 3, 4, 5], C); asserteq!([1, 2, 3, 4, 5], c); asserteq!([S(true), S(false)], F); } ```