-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix macro call site spans #33749
Fix macro call site spans #33749
Conversation
LGTM @DanielJCampbell does this break any of your macro tracing stuff? |
Not that I can see. No failed tests means it passed the tests I had for my stuff, which is a good sign, and I didn't use the original_span method for anything. |
@bors: r+ |
📌 Commit 32b9494 has been approved by |
⌛ Testing commit 32b9494 with merge f3449b6... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
⌛ Testing commit 32b9494 with merge c5bbba8... |
💔 Test failed - auto-linux-64-opt-mir |
☔ The latest upstream changes (presumably #33766) made this pull request unmergeable. Please resolve the merge conflicts. |
32b9494
to
e77a219
Compare
Rebased. @bors r=nrc |
📌 Commit e77a219 has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit e77a219 has been approved by |
Fix macro call site spans Fix macro call site spans. r? @nrc
💔 Test failed - auto-linux-64-opt-mir |
@bors retry |
⌛ Testing commit e77a219 with merge e8ab466... |
💔 Test failed - auto-linux-64-opt-mir |
(that error looks like it may be legit) |
e77a219
to
cc36e38
Compare
I'm having trouble reproducing the error, but I think the above commit will fix it -- r? @nrc |
r? @michaelwoerister for the last commit (r=me for the rest). If the |
@michaelwoerister Since debuginfo for macros is already known to be buggy, perhaps we could just land this with the workaround in the last commit? Another option would be to always use call site spans for debuginfo as described in this comment. While I believe this would fix the bugs I linked and allow this PR to land without the workaround, it would make it impossible to |
Oh, I forgot about this PR. I'll take a look at it tomorrow. |
OK, so I won't get into debuginfo vs macros here -- I'd need to put a lot more thought into that and assess the current situation. From what I can see here, things don't get considerably worse, right? As far as the test case goes: There shouldn't even be a macro invocation here -- in fact, it had been a regular function call before someone changed it to account for the called function being moved, as far as I can tell. We just need something that allows us to reliably set a breakpoint at. I'd suggest just following the pattern of many other debuginfo test cases: Add an empty function |
1458996
to
2477341
Compare
Right. I believe things can only get worse when there is a macro-expanded procedural macro invocation (in this case,
Makes sense, done. |
@bors r=nrc Excellent |
📌 Commit 2477341 has been approved by |
Fix macro call site spans Fix macro call site spans. r? @nrc
Fix macro call site spans.
r? @nrc