-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 line stepping in debugger. #37310
Conversation
Attribute drop code to block's closing brace, instead of the line where the allocation was done. Attribute function epilogues to function body's closing brace, rather than the function header.
I've opted to ignore the fact that span.lo actually points after the brace, because doing it "correctly" would require analyzing codemap for multibyte characters (as you pointed out on IRC). Which is costly, and brings zero benefit: a brace is always followed by |
Multibyte characters? Isn't a brace always a single-byte character? |
@arielb1 Yes, but not all scopes end with braces
That's an interesting observation! From what you've written I assume you've tried it out in the debugger? |
The test case covers the interesting cases, I think. |
@bors r+ |
📌 Commit 209fe0d has been approved by |
Fix line stepping in debugger. Attribute drop code to block's closing brace, instead of the line where the allocation was done. Attribute function epilogues to function body's closing brace, rather than the function header. Fixes rust-lang#37032 r? @michaelwoerister
Fix line stepping in debugger. Attribute drop code to block's closing brace, instead of the line where the allocation was done. Attribute function epilogues to function body's closing brace, rather than the function header. Fixes #37032 r? @michaelwoerister
🎉 |
Attribute drop code to block's closing brace, instead of the line where the allocation was done.
Attribute function epilogues to function body's closing brace, rather than the function header.
Fixes #37032
r? @michaelwoerister