mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
9a88f9f74f
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.