Status: Stub
Complete const generics are currently unstable. You can track their progress here.
Const generics are ok to use in public APIs, so long as they fit in the min_const_generics
subset.
See const evaluation for details on what is accepted for the implementation of const
functions/contexts, which may not use const generics.
Look out for const operations on const generics in public APIs like:
pub fn extend_array<T, const N: usize, const M: usize>(arr: [T; N]) -> [T; N + 1] {
..
}
or for const generics that aren't integers, bools, or chars:
pub fn tag<const S: &'static str>() {
..
}