]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/impl-const-generic-struct.rs
Rollup merge of #79399 - pickfire:patch-3, r=JohnTitor
[rust.git] / src / test / ui / const-generics / impl-const-generic-struct.rs
1 // run-pass
2 // revisions: full min
3
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6
7 struct S<const X: u32>;
8
9 impl<const X: u32> S<X> {
10     fn x() -> u32 {
11         X
12     }
13 }
14
15 fn main() {
16     assert_eq!(S::<19>::x(), 19);
17 }