about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-09 02:40:01 +0100
committerGitHub <noreply@github.com>2021-02-09 02:40:01 +0100
commit9ab05b4fe38e8aef69c981de0b9fb09d621cb96e (patch)
tree11cfb5d513cfa08a6beb74d4cb2e0f92c46ad8f7 /compiler/rustc_codegen_llvm/src/common.rs
parenta63085dc5e718ad75a4571e9522d8a62a7c18ef1 (diff)
parent6eb1bd4c3e3ad9a28d0a3b0f1579a4769d9a88d2 (diff)
downloadrust-9ab05b4fe38e8aef69c981de0b9fb09d621cb96e.tar.gz
rust-9ab05b4fe38e8aef69c981de0b9fb09d621cb96e.zip
Rollup merge of #81876 - osa1:issue81806, r=matthewjasper
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/common.rs')
0 files changed, 0 insertions, 0 deletions