summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/impl-const-generic-struct.rs
blob: 7eb2c6a51fcfbffa69a1505af87ec38e70f0dfdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
struct S<const X: u32>;

impl<const X: u32> S<X> {
    fn x() -> u32 {
        X
    }
}

fn main() {
    assert_eq!(S::<19>::x(), 19);
}