-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Custom derive attribute stripping is insufficient #8434
Comments
This comment has been minimized.
This comment has been minimized.
8443: Rewrite `#[derive]` removal code to be based on AST r=jonas-schievink a=jonas-schievink We now remove any `#[derive]` before and including the one we want to expand, in the `macro_arg` query. The same infra will be needed by attribute macros (except we only remove the attribute we're expanding, not any preceding ones). Part of #8434 (doesn't implement the cfg-expansion yet, because that's more difficult) 8446: Undo path resolution hack for extern prelude r=jonas-schievink a=jonas-schievink Reverts the change made in #7959 We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Another relevant upstream PR: rust-lang/rust#84110 |
Hello! Our team is struggling because of this bug. Do you plan to fix this? It's open for 2 years already. |
Same problem. Is there any progress on this issue? |
This got worse for me about 3 or 4 weeks ago, specifically with |
Any updates here? This would be a big usability boost IMO. |
Same (or very similar) problem here with serde derive, it causes no-such-field error , it's caused by field, which is behind inactive feature, line 164,165. If I enable the feature in rust-analyzer settings that it's OK. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I have started implementing a fix for this. @rustbot claim |
In
The
Derive
macro should be passed the token stream corresponding toCurrently, we pass
Since we have to evalutate
cfg
s to do this correctly, I propose moving theremove_derive_attrs
code tohir_expand
.The text was updated successfully, but these errors were encountered: