bors f9f854f428 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
2024-04-02 13:40:00 +00:00
..
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-14 12:40:33 +09:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-08 22:39:36 -05:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00