]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/infer/one-param-uninferred.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / 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 }