fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.6 KiB45 linesraw
1error[E0416]: identifier `tail` is bound more than once in the same pattern
2  --> $DIR/match-vec-invalid.rs:4:24
3   |
4LL |         [1, tail @ .., tail @ ..] => {},
5   |                        ^^^^ used in a pattern more than once
6
7error[E0658]: subslice patterns are unstable
8  --> $DIR/match-vec-invalid.rs:4:13
9   |
10LL |         [1, tail @ .., tail @ ..] => {},
11   |             ^^^^^^^^^
12   |
13   = note: for more information, see https://github.com/rust-lang/rust/issues/62254
14   = help: add `#![feature(slice_patterns)]` to the crate attributes to enable
15
16error[E0658]: subslice patterns are unstable
17  --> $DIR/match-vec-invalid.rs:4:24
18   |
19LL |         [1, tail @ .., tail @ ..] => {},
20   |                        ^^^^^^^^^
21   |
22   = note: for more information, see https://github.com/rust-lang/rust/issues/62254
23   = help: add `#![feature(slice_patterns)]` to the crate attributes to enable
24
25error: `..` can only be used once per slice pattern
26  --> $DIR/match-vec-invalid.rs:4:31
27   |
28LL |         [1, tail @ .., tail @ ..] => {},
29   |                    --         ^^ can only be used once per slice pattern
30   |                    |
31   |                    previously used here
32
33error[E0308]: mismatched types
34  --> $DIR/match-vec-invalid.rs:13:30
35   |
36LL | const RECOVERY_WITNESS: () = 0;
37   |                              ^ expected (), found integer
38   |
39   = note: expected type `()`
40              found type `{integer}`
41
42error: aborting due to 5 previous errors
43
44Some errors have detailed explanations: E0308, E0416, E0658.
45For more information about an error, try `rustc --explain E0308`.