about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-02 13:40:00 +0000
committerbors <bors@rust-lang.org>2024-04-02 13:40:00 +0000
commitf9f854f4283c9239769f807f14a7475256c8730d (patch)
tree156263c6cb6fa8d0cae75143fafd5461ada0bbf3 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3b1b654f5650a91b5a3ccd7b6c367e43b2196edb (diff)
parente575f05a8b6895fdafd27f5fccca54b60876f318 (diff)
downloadrust-f9f854f4283c9239769f807f14a7475256c8730d.tar.gz
rust-f9f854f4283c9239769f807f14a7475256c8730d.zip
Auto merge of #12617 - y21:issue-12616, r=Alexendoo
avoid an ICE in `ptr_as_ptr` when getting the def_id of a local

Fixes #12616

`Res::def_id` can panic, so avoid calling it in favor of `opt_def_id`, so we can gracefully handle resolutions that don't have a `DefId` (e.g. local variables) and get a false negative in the worst case, rather than an ICE

changelog: Fix ICE in [`ptr_as_ptr`] when the cast expression is a function call to a local variable
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions