rust/tests/ui/const-generics/defaults/auxiliary/const_defaulty.rs
2023-01-11 09:32:08 +00:00

12 lines
199 B
Rust

pub struct Defaulted<const N: usize=3>;
impl Defaulted {
pub fn new() -> Self {
Defaulted
}
}
impl<const N: usize> Defaulted<N> {
pub fn value(&self) -> usize {
N
}
}