about summary refs log tree commit diff
path: root/src/test/ui/const-generics/impl-const-generic-struct.rs
blob: 4c2aee59ffebef14ec73eb5b337cdbad45952d8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete

struct S<const X: u32>;

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

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