summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr
blob: cddd01212798ed83616dbafd8a80c58eedf073c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0425]: cannot find value `rest` in this scope
  --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
   |
LL |         [1, rest..] => println!("{rest:?}"),
   |             ^^^^ not found in this scope
   |
help: if you meant to collect the rest of the slice in `rest`, use the at operator
   |
LL |         [1, rest @ ..] => println!("{rest:?}"),
   |                  +

error[E0425]: cannot find value `rest` in this scope
  --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:35
   |
LL |         [1, rest..] => println!("{rest:?}"),
   |                                   ^^^^ not found in this scope

error[E0658]: `X..` patterns in slices are experimental
  --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
   |
LL |         [1, rest..] => println!("{rest:?}"),
   |             ^^^^^^
   |
   = note: see issue #67264 <https://github.com/rust-lang/rust/issues/67264> for more information
   = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0425, E0658.
For more information about an error, try `rustc --explain E0425`.