summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/defaults/auxiliary/const_defaulty.rs
blob: eed982534c206ce15c9d9f42e0babb45517269b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
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
    }
}