rust/tests/ui/const-generics/impl-const-generic-struct.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
150 B
Rust
Raw Normal View History

2019-05-10 18:08:40 -05:00
// run-pass
struct S<const X: u32>;
impl<const X: u32> S<X> {
2019-05-10 18:08:40 -05:00
fn x() -> u32 {
X
}
}
fn main() {
assert_eq!(S::<19>::x(), 19);
}