rust/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
198 B
Rust
Raw Normal View History

// 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());
}