Re:Rust 1.47
by steveklabnik on Thursday October 08, 2020 @10:23AM
(#24719313)
can be, you can call them at runtime too. And to be clear, const generics aren't stable yet, they're being used as an implementation detail of the standard library here, you cannot yet use them on stable in your code.
Re:Rust 1.47
by Nullabillity on Thursday October 08, 2020 @10:24AM
(#24719318)
> However in this case, these are const generics, so you no longer need to use macro to generate [char;1],[char;2]...
Const generics still aren't stable. I believe the GP was talking about the list of new `const fn`s in the release (near the bottom of the post).
However in this case, these are const generics, so you no longer need to use macro to generate [char;1],[char;2]...
You just write [char; N] where N is const. Compiler determines which values of N are used and generates for them an appropriate version.