about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2021-02-08 10:43:54 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2021-02-08 10:46:19 +0300
commit6eb1bd4c3e3ad9a28d0a3b0f1579a4769d9a88d2 (patch)
tree6b9617fdbfadb5ae72b10ccb0b9c488e21f31cbe /compiler/rustc_codegen_llvm/src
parent0b7a598e12649d7ab2415a82cbc3fea879fa9dab (diff)
downloadrust-6eb1bd4c3e3ad9a28d0a3b0f1579a4769d9a88d2.tar.gz
rust-6eb1bd4c3e3ad9a28d0a3b0f1579a4769d9a88d2.zip
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions