rust/src/test/ui/const-generics/impl-const-generic-struct.rs
Gabriel Smith eaf8fd0569 test: const-generics: Update tests removing unrequired braces
Braces were left in cases where generic args were in the generic const
paths.
2019-11-18 17:23:22 -05:00

16 lines
269 B
Rust

// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
struct S<const X: u32>;
impl<const X: u32> S<X> {
fn x() -> u32 {
X
}
}
fn main() {
assert_eq!(S::<19>::x(), 19);
}