]>
Commit | Line | Data |
---|---|---|
3dfed10e XL |
1 | The type of a const parameter references other generic parameters. |
2 | ||
3 | Erroneous code example: | |
4 | ||
5 | ```compile_fail,E0770 | |
6 | #![feature(const_generics)] | |
7 | fn foo<T, const N: T>() {} // error! | |
8 | ``` | |
9 | ||
10 | To fix this error, use a concrete type for the const parameter: | |
11 | ||
12 | ``` | |
13 | #![feature(const_generics)] | |
14 | fn foo<T, const N: usize>() {} | |
15 | ``` |