]> git.proxmox.com Git - rustc.git/blame - src/librustc_error_codes/error_codes/E0770.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0770.md
CommitLineData
3dfed10e
XL
1The type of a const parameter references other generic parameters.
2
3Erroneous code example:
4
5```compile_fail,E0770
6#![feature(const_generics)]
7fn foo<T, const N: T>() {} // error!
8```
9
10To fix this error, use a concrete type for the const parameter:
11
12```
13#![feature(const_generics)]
14fn foo<T, const N: usize>() {}
15```