]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | // run-pass |
2 | ||
3 | #![feature(const_generics)] | |
4 | //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash | |
5 | ||
6 | struct S<const X: u32>; | |
7 | ||
60c5eb7d | 8 | impl<const X: u32> S<X> { |
48663c56 XL |
9 | fn x() -> u32 { |
10 | X | |
11 | } | |
12 | } | |
13 | ||
14 | fn main() { | |
15 | assert_eq!(S::<19>::x(), 19); | |
16 | } |