Error code E0671
Note: this error code is no longer emitted by the compiler.
Const parameters cannot depend on type parameters. The following is therefore invalid:
#![allow(unused)]
fn main() {
fn const_id<T, const N: T>() -> T { // error
N
}
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Const parameters cannot depend on type parameters. The following is therefore invalid:
#![allow(unused)]
fn main() {
fn const_id<T, const N: T>() -> T { // error
N
}
}