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
}
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0671.html