-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`
Description
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?
}Metadata
Metadata
Assignees
Labels
F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`