]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / const-generics / generic_arg_infer / array-repeat-expr.rs
1 // run-pass
2
3 // To avoid having to `or` gate `_` as an expr.
4 #![feature(generic_arg_infer)]
5
6 fn foo() -> [u8; 3] {
7     let x: [u8; _] = [0; _];
8     x
9 }
10
11 fn main() {
12     assert_eq!([0; _], foo());
13 }