blob: 9e0572d3568cb771bcf13065218fb4ebfe6d9ed2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// check-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete
struct Const<const N: usize>;
impl<const C: usize> Const<{C}> {
fn successor() -> Const<{C + 1}> {
Const
}
}
fn main() {
let _x: Const::<2> = Const::<1>::successor();
}
|