rust/compiler/rustc_parse
Ömer Sinan Ağacan 853f7875a2 parser: Fix panic in 'const impl' recovery
The panic happens when in recovery parsing a full `impl`
(`parse_item_impl`) fails and we drop the `DiagnosticBuilder` for the
recovery suggestion and return the `parse_item_impl` error.

We now raise the original error "expected identifier found `impl`" when
parsing the `impl` fails.

Note that the regression test is slightly simplified version of the
original repro in #81806, to make the error output smaller and more
resilient to unrelated changes in parser error messages.

Fixes #81806
2021-02-13 10:43:07 -05:00
..
src parser: Fix panic in 'const impl' recovery 2021-02-13 10:43:07 -05:00
Cargo.toml mv compiler to compiler/ 2020-08-30 18:45:07 +03:00