about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-12 17:41:34 +0200
committerGitHub <noreply@github.com>2024-04-12 17:41:34 +0200
commit8c8692014b72648e152ac554cae73c3777c48480 (patch)
tree95ce8c55a4f76e7b3e2203d62fdde47007d68b9c /compiler/rustc_pattern_analysis/src
parent4a0e9e0debeb29f5cf0ae4e886c8c9a1cbb2fe78 (diff)
parentd8dc28b93e4cbfe2a3c26af06c73b0ea46f67a1e (diff)
downloadrust-8c8692014b72648e152ac554cae73c3777c48480.tar.gz
rust-8c8692014b72648e152ac554cae73c3777c48480.zip
Rollup merge of #123825 - saethlin:report-nounwind-panics, r=petrochenkov
Call the panic hook for non-unwind panics in proc-macros

As I suggested in https://github.com/rust-lang/rust/issues/123286#issuecomment-2030344815.

If a proc macro causes a non-unwinding panic, `proc_macro` isn't able to catch the unwind and report the panic as a compile error by passing control back to the compiler. Our only chance to produce any diagnostic is the panic hook, so we should call it.

This scenario has already existed, but has become a lot more interesting now that we're adding more UB-detecting panics to the standard library, and such panics do not unwind.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions