rust/tests/rustdoc/const-generics/auxiliary/extern_crate.rs
2023-01-11 09:32:08 +00:00

17 lines
352 B
Rust

// edition:2018
pub fn extern_fn<const N: usize>() -> impl Iterator<Item = [u8; N]> {
[[0; N]; N].iter().copied()
}
pub struct ExternTy<const N: usize> {
pub inner: [u8; N],
}
pub type TyAlias<const N: usize> = ExternTy<N>;
pub trait WTrait<const N: usize, const M: usize> {
fn hey<const P: usize>() -> usize {
N + M + P
}
}