summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs
blob: d3e53d7a89267c7c467428d350401cda3f902730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

// To avoid having to `or` gate `_` as an expr.
#![feature(generic_arg_infer)]

fn foo() -> [u8; 3] {
    let x: [u8; _] = [0; _];
    x
}

fn main() {
    assert_eq!([0; _], foo());
}