We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is an enhancement request. I think it's good to accept partial generic arguments, allowing all this code to compile:
#![feature(const_generics)] #![allow(incomplete_features)] fn foo<T, const N: usize>(_: [T; N]) {} fn bar<T, const N: usize, const K: u32>(_: [T; N]) {} fn main() { let data = [1_u8, 2]; foo::<u8, 2>(data); // OK foo::<_, 2>(data); // OK foo::<u8, _>(data); // Error? foo::<_, _>(data); // Error? foo(data); // OK bar::<u8, 2, 10>(data); // OK bar::<_, 2, 10>(data); // OK bar::<_, _, 3>(data); // Error? }
The text was updated successfully, but these errors were encountered:
This is fairly similar to #70754, which already has some discussion on what needs to change in order to support this.
Sorry, something went wrong.
Thank you.
No branches or pull requests
This is an enhancement request. I think it's good to accept partial generic arguments, allowing all this code to compile:
The text was updated successfully, but these errors were encountered: