rust/compiler/rustc_mir_transform
bors 6316ac83d7 Auto merge of #118595 - Zalathar:visible-macro, r=TaKO8Ki
coverage: Be more strict about what counts as a "visible macro"

This is a follow-up to the workaround in #117827, and I believe it now properly fixes #117788.

The old code treats a span as having a “visible macro” if it is part of a macro-expansion, and its parent callsite's context is the same as the body span's context. But if the body span is itself part of an expansion, the macro in question might not actually be visible from the body span. That results in the macro name's length being meaningless as a span offset.

We now only consider spans whose parent callsite is the same as the source callsite, i.e. the parent has no parent.

---

I've also included some related cleanup for the code added by #117827. That code was more complicated than normal, because I wanted it to be easy to backport to stable/beta.
2023-12-06 14:01:21 +00:00
..
src Auto merge of #118595 - Zalathar:visible-macro, r=TaKO8Ki 2023-12-06 14:01:21 +00:00
Cargo.toml Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
messages.ftl Print list of missing target features when calling a function with target features outside an unsafe block 2023-11-27 19:13:11 +01:00