-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tracking issue for RFC 2539, "#[cfg_attr] expanding to multiple attributes" #54881
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
Implementation in #54862 |
Setting earliest date for stabilization proposal: 2018-11-22 (11 days from now). |
Stabilization proposal@rfcbot merge Originally proposed in RFC rust-lang/rfcs#2539, implemented in #54862, and in nightly since ~ the 12th October, Version targetThe next version is 1.32 which goes into beta the 7th of December; It is quite possible that this will slip into 1.33 however depending on how long the review process takes. What is stabilized
Users are now permitted to write for example: #[cfg_attr(all(),)] struct A; // trailing comma permitted as well as zero items.
#[cfg_attr(all(), must_use)] struct A;
#[cfg_attr(all(), must_use,)] struct A; // trailing permitted.
#[cfg_attr(foo, must_use, deprecated)] struct A;
#[cfg_attr(all(), must_use, deprecated,)] struct A; // trailing permitted. The semantics of these are to expand to for example If zero attributes are given, e.g. What is notUsers are not permitted to write:
Divergences from RFCNone cc @Havvy can you make the stabilization PR + resolve the minor FIXME in it? |
Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged teams:
No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I wouldn't call the implementation of the lint a minor fix. The first time I tried, I bailed when I hit a set of cases I couldn't get something the lint infrastructure wanted. The lint is also the least value add of the RFC and I propose stabilizing it separately if doing so doesn't break backwards compatibility. |
@Havvy Warn by default lints can always be added later so if you think it is non-trivial to implement in the stabilization PR, I wouldn't mind deferring that to the future; as you say, it is indeed the least value-add. However, if you do manage to fix it in the stabilization PR, that would be nice (but not required, imo). |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
@Havvy Up for writing the stabilization PR? |
I don't and haven't had motivation pertaining to Rustlang at the moment, sorry. Eventually it'll return. |
r? @Dylan-DPC |
Stabilization has gone through and documentation issue has been filed against the reference; what remains is to fix the lint which @Dylan-DPC will do in a separate PR. After that this issue can be closed. |
…bank Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]` Lint on `#[cfg_attr($pred,)]` as decided in rust-lang#54881 (comment). Closes rust-lang#54881. r? @estebank
…bank Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]` Lint on `#[cfg_attr($pred,)]` as decided in rust-lang#54881 (comment). Closes rust-lang#54881. r? @estebank
This is a tracking issue for the RFC "
#[cfg_attr]
expanding to multiple attributes" (rust-lang/rfcs#2539).Steps:
#[cfg_attr(p, attr1, attr2)]
) reference#500)Unresolved questions:
None
The text was updated successfully, but these errors were encountered: