blob: 64674bb894e1f426892adf3b03202ac0e9630c7c (
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 and may cause the compiler to crash
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();
}
|