rust/compiler/rustc_parse/src
Jonathan Brouwer 00501de1c8
Rollup merge of #151099 - issue-84327-2, r=fmease
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.
2026-01-14 22:30:00 +01:00
..
lexer feat: invisible character help string 2026-01-10 14:31:37 +00:00
parser Rollup merge of #151099 - issue-84327-2, r=fmease 2026-01-14 22:30:00 +01:00
errors.rs feat: invisible character help string 2026-01-10 14:31:37 +00:00
lib.rs lexer/parser: ensure deps use the same unicode version 2025-12-27 11:20:42 +01:00