You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Input to #[proc_macro_derive] is able to see underlying derive attributes. This is not supposed to happen as per the change in version 1.17.0. A pull request was merged to remove this effect.
But version 1.52.0 onwards, underlying attributes are visible again to derive and this is not mentioned in RELEASES.md.
cc @petrochenkov - I believe the new behavior is the one we want, since it makes derived 'just another attribute'. If so, we should document it more clearly in the release notes.
Triage: dropping regression-untriaged and I-prioritize as this isn't an actual regression.
JohnTitor
added
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
and removed
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
regression-untriaged
Untriaged performance or correctness regression.
labels
Jun 7, 2021
Input to
#[proc_macro_derive]
is able to see underlying derive attributes. This is not supposed to happen as per the change in version 1.17.0. A pull request was merged to remove this effect.But version 1.52.0 onwards, underlying attributes are visible again to derive and this is not mentioned in RELEASES.md.
Code
Example code is available here: https://github.com/MihirLuthra/derive_issue_example
In the following code below,
#[derive(Abc)]
generates a function namedprint_all_attributes()
which prints all derive attributes visible to it.#[derive(Abc)]
is defined as:Output on Version 1.51.0
Ouputs a blank line:
rustc --version --verbose
:Output on Version 1.52.1
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: