rust/compiler/rustc_parse
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
..
src Rollup merge of #151099 - issue-84327-2, r=fmease 2026-01-14 22:30:00 +01:00
Cargo.toml Update literal-escaper version to 0.0.7 2026-01-08 14:10:33 +01:00
messages.ftl feat: invisible character help string 2026-01-10 14:31:37 +00:00