-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
!include'd source has all debug/error line numbers attributed to !include statement #36382
Comments
Note: if I build with "-Z debug-macros" line numbers get properly attributed to the included source; not sure if this is intentional behaviour in this case? |
Or.. not completely. With
|
For the record, the error line was:
with last() wanting a &str. If I changed this to cause another error, it was reported to the right line properly. |
I'm not sure if this is related, but I've noticed For example, if I have |
Yes, this is intentional: #35238. Most of the time you want to step over macros. But if not, that's what |
|
The debug info emission code treats all macros uniformly, whether they are MBEs or procedural. Singling out |
Hacky, but perhaps a lot less unexpected. No reason; legacy code that did it this way. I may do a PR to change it. |
Just ran into this. It's not possible to avoid |
Servo is in a similar bind to the previous comment - we generate a lot of code in the out directory, and there's no way to reference it without using |
If we hardcode an exclusion for |
Certainly would for me!
|
…erister Exclude top-level macro expansions from source location override. It occurred to me that a simple heuristic can address the issue rust-lang#36382: any macros that expand into items (including `include!()`) don't need to be stepped over because there's not code to step through above a function scope level. r? @michaelwoerister
Should be fixed in the current nightly. |
as in https://github.com/servo/ipc-channel/blob/master/src/platform/mod.rs#L18
Tested on nightly-x86_64-pc-windows-gnu rustc 1.13.0-nightly (497d67d 2016-09-01), and with mingw64 gdb.
The text was updated successfully, but these errors were encountered: