blob: d6018650f533d5f95bd63de239938155f75498d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// Test that we emit an error if we cannot properly infer a constant.
fn foo<const N: usize, const M: usize>() -> [u8; N] {
todo!()
}
fn main() {
// FIXME(const_generics): Currently this only suggests one const parameter,
// but instead it should suggest to provide all parameters.
let _: [u8; 17] = foo();
//~^ ERROR type annotations needed
}
|