mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
Avoid const generic recovery after doc comment in type Fixes rust-lang/rust#122463. When parsing a generic argument, rustc may snapshot the parser state and retry a failed type parse as an unbraced const generic argument. For `Vec<(/// doc f32, f32)>`, that recovery produces a misleading follow-up E0747 after the useful “expected type, found doc comment” diagnostic. This skips that const-generic recovery path when type parsing stopped at a doc comment, and adds a regression test for the compiler diagnostic.