2024-02-02 18:32:01 -06:00
|
|
|
error: range-to patterns with `...` are not allowed
|
2024-04-27 19:35:32 -05:00
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:17:13
|
2024-02-02 18:32:01 -06:00
|
|
|
|
|
|
|
|
LL | [_, ...tail] => println!("{tail}"),
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: use `..=` instead
|
|
|
|
|
|
|
|
|
LL | [_, ..=tail] => println!("{tail}"),
|
|
|
|
| ~~~
|
2024-02-02 18:32:01 -06:00
|
|
|
|
2023-11-16 18:55:55 -06:00
|
|
|
error[E0425]: cannot find value `rest` in this scope
|
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
|
|
|
|
|
|
2024-02-02 18:32:01 -06:00
|
|
|
LL | [1, rest..] => println!("{rest}"),
|
2023-11-16 18:55:55 -06:00
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
|
|
|
|
help: if you meant to collect the rest of the slice in `rest`, use the at operator
|
|
|
|
|
|
2024-02-02 18:32:01 -06:00
|
|
|
LL | [1, rest @ ..] => println!("{rest}"),
|
2023-11-16 18:55:55 -06:00
|
|
|
| +
|
|
|
|
|
|
|
|
error[E0425]: cannot find value `rest` in this scope
|
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:35
|
|
|
|
|
|
2024-02-02 18:32:01 -06:00
|
|
|
LL | [1, rest..] => println!("{rest}"),
|
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
|
|
|
error[E0425]: cannot find value `tail` in this scope
|
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:11:15
|
|
|
|
|
|
|
|
|
LL | [_, ..tail] => println!("{tail}"),
|
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
|
|
|
|
help: if you meant to collect the rest of the slice in `tail`, use the at operator
|
|
|
|
|
|
|
|
|
LL | [_, tail @ ..] => println!("{tail}"),
|
|
|
|
| ~~~~~~~~~
|
|
|
|
|
|
|
|
error[E0425]: cannot find value `tail` in this scope
|
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:11:35
|
|
|
|
|
|
|
|
|
LL | [_, ..tail] => println!("{tail}"),
|
2023-11-16 18:55:55 -06:00
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
2024-02-02 18:32:01 -06:00
|
|
|
error[E0425]: cannot find value `tail` in this scope
|
2024-04-27 19:35:32 -05:00
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:17:16
|
2024-02-02 18:32:01 -06:00
|
|
|
|
|
|
|
|
LL | [_, ...tail] => println!("{tail}"),
|
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
|
|
|
|
help: if you meant to collect the rest of the slice in `tail`, use the at operator
|
|
|
|
|
|
|
|
|
LL | [_, tail @ ..] => println!("{tail}"),
|
|
|
|
| ~~~~~~~~~
|
|
|
|
|
|
|
|
error[E0425]: cannot find value `tail` in this scope
|
2024-04-27 19:35:32 -05:00
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:17:36
|
2024-02-02 18:32:01 -06:00
|
|
|
|
|
|
|
|
LL | [_, ...tail] => println!("{tail}"),
|
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
2023-11-16 18:55:55 -06:00
|
|
|
error[E0658]: `X..` patterns in slices are experimental
|
|
|
|
--> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
|
|
|
|
|
|
2024-02-02 18:32:01 -06:00
|
|
|
LL | [1, rest..] => println!("{rest}"),
|
2023-11-16 18:55:55 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2024-01-10 00:39:02 -06:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2023-11-16 18:55:55 -06:00
|
|
|
|
2024-04-27 19:35:32 -05:00
|
|
|
error: aborting due to 8 previous errors
|
2023-11-16 18:55:55 -06:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0425, E0658.
|
|
|
|
For more information about an error, try `rustc --explain E0425`.
|