-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Refactor feature gates #63855
Refactor feature gates #63855
Conversation
Feature gate definitions were split into multiple files in rust-lang#63824 but tidy kept reporting the hard-coded path. Now, it shows the full path to the correct file.
This is just in preparation for future usage of these texts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! r=me with comments below addressed. :)
Thanks for the review, @Centril! I've changed most of the loops you mentioned, so it'd be good to have a second look before I blindly r+ this :) |
6b76fd2
to
6ffc834
Compare
@bors r+ |
📌 Commit 6ffc834 has been approved by |
…=Centril Refactor feature gates After rust-lang#63824, this goes a few steps further by - parsing doc comments in the macros to extract descriptions for feature gates, and - introducing a common `Feature` type to replace the tuples used previously to improve readability. The descriptions are not yet used, but I felt like this PR is a useful enough refactoring on its own. r? @Centril
This comment has been minimized.
This comment has been minimized.
That's odd; I don't see anything that would cause this... @bors r- |
This replaces the ad-hoc tuples used in the different feature gate files and unifies their content into a common type, leading to more readable matches and other good stuff that comes from having named fields. It also contains the description of each feature as extracted from the doc comment.
6ffc834
to
1e6d3e2
Compare
Let's try this again! Tests pass locally but I'll wait for CI before sending it off to bors. |
This comment has been minimized.
This comment has been minimized.
Tries to clarify the filtering of active features and make the code more expressive.
1e6d3e2
to
94e8ff4
Compare
@bors r=Centril rollup |
📌 Commit 94e8ff4 has been approved by |
…=Centril Refactor feature gates After rust-lang#63824, this goes a few steps further by - parsing doc comments in the macros to extract descriptions for feature gates, and - introducing a common `Feature` type to replace the tuples used previously to improve readability. The descriptions are not yet used, but I felt like this PR is a useful enough refactoring on its own. r? @Centril
Rollup of 6 pull requests Successful merges: - #63317 (Do not complain about unused code when used in `impl` `Self` type) - #63693 (Fully implement or-pattern parsing) - #63836 (VxWorks does not provide a way to set the task name except at creation time) - #63845 (Removed a confusing FnOnce example) - #63855 (Refactor feature gates) - #63921 (add link to FileCheck docs) Failed merges: r? @ghost
After #63824, this goes a few steps further by
Feature
type to replace the tuples used previously to improve readability.The descriptions are not yet used, but I felt like this PR is a useful enough refactoring on its own.
r? @Centril