arr_ty
Macros for smart array initialization.
The author of this crate is not good at English.
Forgive me if the document is hard to read.
What is this?
This crate makes Rust array initialization a little smarter.
⚠ Attention!
This crate is useless in the latest version of Rust.
generic_arg_infer was introduced in Rust 1.89.0 (2025-08-07).
(See rust issue #85077 for more details).
Examples
Use case 1 (number element type)
This is not possible.
let arr = as ;
With this crate.
let arr = arr_ty!;
Without this crate, manual counting approach.
let arr = as ;
Without this crate, redundant type approach.
let arr = ;
Without this crate, no unity approach.
let arr = ;
Use case 2 (dynamic element type)
This is not possible.
let arr: = ;
With this crate.
let arr = arr_ty!;
Without this crate, manual counting approach.
let arr: = ;
Without this crate, redundant cast approach.
let arr = ;
Without this crate, no unity approach.
let arr = ;
History
See CHANGELOG.