Rollup merge of #70562 - lcnr:const-arr_len, r=Centril
infer array len from pattern closes #70529 This still errors in the following case ```rust #![feature(const_generics)] fn arr<const N: usize>() -> [u8; N] { todo!() } fn main() { match arr() { [5, ..] => (), //~^ ERROR cannot pattern-match on an array without a fixed length [_, _] => (), } } ``` Considering that this should be rare and is harder to implement I would merge this PR without *fixing* the above.
Showing
想要评论请 注册 或 登录