5c3e01a340
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. |
||
---|---|---|
.. | ||
diagnostics | ||
late | ||
build_reduced_graph.rs | ||
check_unused.rs | ||
def_collector.rs | ||
diagnostics.rs | ||
effective_visibilities.rs | ||
errors.rs | ||
ident.rs | ||
imports.rs | ||
late.rs | ||
lib.rs | ||
macros.rs | ||
rustdoc.rs |