Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#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 rust-lang#117827, and I believe it now properly fixes rust-lang#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 rust-lang#117827. That code was more complicated than normal, because I wanted it to be easy to backport to stable/beta.
- Loading branch information