-
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
Syntax backtraces don't work for the new macro system #3065
Comments
Not critical for 0.6, de-milestoning |
What's the expected output here? Running the example gives:
|
It should give a "backtrace" of errors, indicating both of the invocations that led to the error. |
Nominating for milestone 3, feature-complete |
accepted for production-ready milestone |
(bug triage) Milestone still looks right; carry on. |
we should feature-guard whatever this log-syntax thing is. |
under assumption log_syntax gets feature guarded, this is accepted for P-low |
|
(Hi, I'm trying to help make E-easy issues more accessible to newcomers 😸) I tried reproducing this and it compiles and prints "asdf". From the book chapter on macros:
This sounds like I'm also not sure how to interpret paulstansifer's comment:
What error is this referring to? Which two invocations is this referring to? Basically... is this still an issue? If so, it's sounding more like an additional feature to |
@carols10cents That's a great idea. I'm not 100% sure that this is E-Easy, as it requires some knowledge of the internals of macro expansion. The "syntactic backtrace" is analogous to, but totally distinct from, the standard idea of a backtrace. In the following example (my original example is not great):
...Rust should print out the sequence of macro invocations that led to
I think that the facility for printing syntactic backtraces exists, but it's not getting the right information. |
Not easy! |
The backtrace behavior described in the op may actually be referring to |
Triage: this issue is so old that "new macro system" refers to the macro system that we're about to soft deprecate 😆 🤣 I'm not sure if this is something that is still relevant or will be addressed. The whole feature is describe as a "hack that is likely to be removed." As such, I'm going to close this. RIP a four-digit issue. |
log_syntax!
should emit, in this case, information about the invocation of my_complex_macro(), but doesn't. I believe that this can be fixed by having transcribe.rs set upexpn_info
the way that simplext.rs does.The text was updated successfully, but these errors were encountered: