]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/impl-const-generic-struct.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / const-generics / impl-const-generic-struct.rs
CommitLineData
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
6struct S<const X: u32>;
7
60c5eb7d 8impl<const X: u32> S<X> {
48663c56
XL
9 fn x() -> u32 {
10 X
11 }
12}
13
14fn main() {
15 assert_eq!(S::<19>::x(), 19);
16}