-
Notifications
You must be signed in to change notification settings - Fork 13.4k
deriving doesn't work inside function #4913
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
It seems that this issue is well known but not filed as a bug. Also note that the problem is not limited to deriving_eq but other item decorators as well. |
Not critical for 0.7. Nominating for milestone 1, well-defined. |
declined; it's a bug but not a major one, can be worked around. |
visited for triage 2013-07-23. Fixing this cleanly requires poking around in the expand code; I looked briefly at doing so: one obstacle is that the expand code (and potentially the ast fold functions it uses) would need to be generalized to support mapping an |
@pnkfelix I don't think that's the problem for this exact issue (it is for #4375 though), pub type ItemDecorator = @fn(@ExtCtxt,
span,
@ast::MetaItem,
~[@ast::item])
-> ~[@ast::item]; I believe the problem is the (In any case, I have a feeling that @jbclements would appreciate |
@huonw I agree that the problem is that |
(in particular, the |
I see; that makes sense. |
Unfortunately this issue means we can't demonstrate |
Still relevant. (revision 658637b) |
Now that fold_item can return multiple items, this is pretty trivial. It also recursively expands generated items so ItemDecorators can generate items that are tagged with ItemDecorators! Closes rust-lang#4913
Fixes a regression from rust-lang#4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
Fixes a regression from #4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
Example: (also confirmed by
--pretty expanded
)The text was updated successfully, but these errors were encountered: