]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0770.md
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0770.md
1 The type of a const parameter references other generic parameters.
2
3 Erroneous code example:
4
5 ```compile_fail,E0770
6 fn foo<T, const N: T>() {} // error!
7 ```
8
9 To fix this error, use a concrete type for the const parameter:
10
11 ```
12 fn foo<T, const N: usize>() {}
13 ```