rust/compiler/rustc_parse
Ömer Sinan Ağacan 6eb1bd4c3e 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-08 10:46:19 +03:00
..
src parser: Fix panic in 'const impl' recovery 2021-02-08 10:46:19 +03:00
Cargo.toml mv compiler to compiler/ 2020-08-30 18:45:07 +03:00