]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/infer/one-param-uninferred.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / infer / one-param-uninferred.rs
1 // Test that we emit an error if we cannot properly infer a constant.
2 fn foo<const N: usize, const M: usize>() -> [u8; N] {
3 todo!()
4 }
5
6 fn main() {
7 // FIXME(const_generics): Currently this only suggests one const parameter,
8 // but instead it should suggest to provide all parameters.
9 let _: [u8; 17] = foo();
10 //~^ ERROR type annotations needed
11 }