Skip to content
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

Merged
merged 2 commits into from
Apr 2, 2018
Merged

Conversation

Manishearth
Copy link
Member

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2018
@kennytm kennytm added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2018

pub fn feature_name(&self) -> &'static str {
match *self {
Edition::Edition2015 => "rust_2015_preview",
Copy link
Member

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?

Copy link
Member Author

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.

@nikomatsakis
Copy link
Contributor

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:

#46889

though some of those are rapidly stabilizing. I can come around for a more complete list soon.

@bors
Copy link
Contributor

bors commented Mar 23, 2018

☔ The latest upstream changes (presumably #49308) made this pull request unmergeable. Please resolve the merge conflicts.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean libs? :)

@Manishearth
Copy link
Member Author

Done

@shepmaster shepmaster added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Mar 30, 2018
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 2, 2018

📌 Commit 195c6b4 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Apr 2, 2018
@bors
Copy link
Contributor

bors commented Apr 2, 2018

⌛ Testing commit 195c6b4 with merge 934902a...

bors added a commit that referenced this pull request Apr 2, 2018
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
@bors
Copy link
Contributor

bors commented Apr 2, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 934902a to master...

@bors bors merged commit 195c6b4 into rust-lang:master Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants