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
151 B
Rust
Raw Normal View History

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