summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0770.md
blob: cd8fc481bf0cdceabf5d9c3aa00b1fcff7aaeed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
The type of a const parameter references other generic parameters.

Erroneous code example:

```compile_fail,E0770
fn foo<T, const N: T>() {} // error!
```

To fix this error, use a concrete type for the const parameter:

```
fn foo<T, const N: usize>() {}
```