about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-26 10:01:11 +0000
committerbors <bors@rust-lang.org>2023-05-26 10:01:11 +0000
commitb4e3fec176bc5e9709530ad8c43ae7a750e3b2a8 (patch)
tree9a222f7f5e7c17407f558156a7527a894cbbdbfd /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
parent615aaa47510fae3a95d95cbd8b607c3695878161 (diff)
parent397c8e51480cc6c350433deefd8548e1455506c6 (diff)
downloadrust-b4e3fec176bc5e9709530ad8c43ae7a750e3b2a8.tar.gz
rust-b4e3fec176bc5e9709530ad8c43ae7a750e3b2a8.zip
Auto merge of #14895 - lowr:fix/goto-type-def-tokens-in-tt, r=Veykril
fix: don't try determining type of token inside macro calls

When we're requested `Go to Type Definition`, we first downmap the token in question to tokens in every macro call expansion involved, and then determine the type of those mapped tokens by looking for the nearest ancestor node that is either expression or pattern (or a few others). This procedure has one flaw: When the downmapped token is inside another macro call, the nearest ancestor node to retrieve the type of is *that* macro call. That's not what we should return in general and therefore we should disregard it.

Notably, now that we expand built-in `format_arg!` and its family macros, we're always returning [`Arguments`] when one `Go to Type Definition` at `dbg!(variable$0)` along with the actual type of `variable` without this patch.

[`Arguments`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions