summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs
blob: 5c548740af2398aadf68efd026b32d43e5b42f38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(const_generics_defaults)]

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
    }
}