Recover parse gracefully from `<const N>` When a const param doesn't have a `: Type`, recover the parser state and provide a structured suggestion. This not only provides guidance on what was missing, but it also makes subsuequent errors to be emitted that would otherwise be silenced. ``` error: expected `:`, found `>` --> $DIR/incorrect-const-param.rs:26:16 | LL | impl<T, const N> From<[T; N]> for VecWrapper<T> | ^ expected `:` | help: you might have meant to write the type of the const parameter here | LL | impl<T, const N: /* Type */> From<[T; N]> for VecWrapper<T> | ++++++++++++ ``` r? @fmease Follow up to rust-lang/rust#151077. Fix rust-lang/rust#84327. |
||
|---|---|---|
| .. | ||
| lexer | ||
| parser | ||
| errors.rs | ||
| lib.rs | ||