Files
rust/compiler
Matthias Krüger 488c2aac29 Rollup merge of #117998 - estebank:issue-88404, r=TaKO8Ki
On resolve error of `[rest..]`, suggest `[rest @ ..]`

When writing a pattern to collect multiple entries of a slice in a single binding, it is easy to misremember or typo the appropriate syntax to do so, instead writing the experimental `X..` pattern syntax. When we encounter a resolve error because `X` isn't available, we suggest `X @ ..` as an alternative.

```
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:?}"),
   |                  +
```

Fix #88404.
2023-11-17 08:10:27 +01:00
..
2023-10-30 08:46:02 +11:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-10-30 08:46:02 +11:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-13 09:45:20 +11:00
2023-11-15 01:24:44 +00:00