Can I get a Rust array's length with only a type, not a concrete variable?
问题 I want to rewrite the following C++ code into Rust: using storage = array<int, 3>; const size_t storage_len = sizeof(storage) / sizeof(storage::value_type); How can I get that constant length value without a concrete variable? As motivation, although it may seem trivial, I want to print the array's element count without declaring a variable. I know I could use a constant value or declare a dummy variable, but I wonder how Rust can preserve C++ code. I admit without a concrete variable is not