Closed
Description
Given the following code:
#![feature(box_syntax)]
#![feature(half_open_range_patterns_in_slices)]
fn main() {
let [_y..] = [box 1, box 2];
}
The current output is:
error[E0425]: cannot find value `_y` in this scope
--> 4a310255aac576a3d3d7ede99bff59ef38f2fb87.rs:4:10
|
4 | let [_y..] = [box 1, box 2];
| ^^ not found in this scope
error[E0527]: pattern requires 1 element but array has 2
--> 4a310255aac576a3d3d7ede99bff59ef38f2fb87.rs:4:9
|
4 | let [_y..] = [box 1, box 2];
| ^^^^^^ expected 2 elements
error[E0029]: only `char` and numeric types are allowed in range patterns
--> 4a310255aac576a3d3d7ede99bff59ef38f2fb87.rs:4:10
|
4 | let [_y..] = [box 1, box 2];
| ^^ this is of type `[type error]` but it should be `char` or numeric
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0029, E0425, E0527.
For more information about an error, try `rustc --explain E0029`.
We shouldn't show [type error]
here.