-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Easy edition feature flag #49252
Easy edition feature flag #49252
Conversation
|
||
pub fn feature_name(&self) -> &'static str { | ||
match *self { | ||
Edition::Edition2015 => "rust_2015_preview", |
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.
Avoiding the anachronism of "preview" may be more valuable than keeping these names symmetrical?
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.
No, once a feature is added it can't be "removed" completely.
There's no way to use the rust_2015_preview feature, that feature exists only so that attempting to use it will throw a "feature removed" warning. This goes for the 2018_preview feature when you enable the 2018 epoch, as well.
Yes, we could just not do this for 2015, but it didn't seem worth it to special case 2015.
Sorry @Manishearth, didn't get to this yesterday and may not today. I suck. As far as feature flags go, a preliminary list would be the features found here: though some of those are rapidly stabilizing. I can come around for a more complete list soon. |
☔ The latest upstream changes (presumably #49308) made this pull request unmergeable. Please resolve the merge conflicts. |
4dd01d5
to
b622870
Compare
for &(.., f_edition, set) in ACTIVE_FEATURES.iter() { | ||
if let Some(f_edition) = f_edition { | ||
if edition >= f_edition { | ||
// FIXME(Manishearth) there is currently no way to set |
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.
do you mean libs? :)
b622870
to
45f9aab
Compare
45f9aab
to
195c6b4
Compare
Done |
@bors r+ |
📌 Commit 195c6b4 has been approved by |
Easy edition feature flag We no longer gate features on epochs; instead we have a `#![feature(rust_2018_preview)]` that flips on a bunch of features (currently dyn_trait). Based on #49001 to avoid merge conflicts r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
We no longer gate features on epochs; instead we have a
#![feature(rust_2018_preview)]
that flips on a bunch of features (currently dyn_trait).Based on #49001 to avoid merge conflicts
r? @nikomatsakis