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

Add functionality for gating feature flags on epochs ; rejigger epoch lints #48801

Merged
merged 9 commits into from
Mar 9, 2018

Conversation

Manishearth
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 7, 2018
@Centril Centril added the WG-epoch Working group: Epoch (2018) management label Mar 7, 2018
@Manishearth Manishearth force-pushed the epoch-features branch 3 times, most recently from 83f60ca to f249692 Compare March 7, 2018 18:50
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Looks nice!

let mut features = Features::new();

let mut feature_checker = FeatureChecker::default();

for &(.., f_epoch, set) in ACTIVE_FEATURES.iter() {
if let Some(f_epoch) = f_epoch {
if epoch >= f_epoch {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make a test?

Copy link
Contributor

Choose a reason for hiding this comment

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

e.g., // compile-flags: -Zepoch=2018, and then use dyn Trait

@bors
Copy link
Contributor

bors commented Mar 8, 2018

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

@nikomatsakis nikomatsakis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2018
@Manishearth Manishearth force-pushed the epoch-features branch 2 times, most recently from 5baa8bb to fc5ad32 Compare March 8, 2018 17:33
@Manishearth
Copy link
Member Author

Added test.

Oh, also, I'm going to make bare_trait_object and unreachable_pub not be epoch lints -- I'll keep epoch lints to be actual breaking changes like tyvar_rptr and the keywords, and these lints can go ungrouped for now (we can group them later if we wish?)

@Manishearth Manishearth force-pushed the epoch-features branch 2 times, most recently from 779c10c to 9272579 Compare March 8, 2018 21:27
@Manishearth Manishearth changed the title Add functionality for gating feature flags on epochs Add functionality for gating feature flags on epochs ; rejigger epoch lints Mar 8, 2018
pub trait Foo {}

// should compile without the dyn trait feature flag
fn foo(x: &dyn Foo) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 8, 2018

📌 Commit d9f0c16 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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 8, 2018
@bors
Copy link
Contributor

bors commented Mar 9, 2018

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 9, 2018
@Manishearth
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 9, 2018

📌 Commit a08cfc4 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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 9, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 9, 2018
…atsakis

Add functionality for gating feature flags on epochs ; rejigger epoch lints

fixes rust-lang#48794

r? @nikomatsakis
bors added a commit that referenced this pull request Mar 9, 2018
Rollup of 5 pull requests

- Successful merges: #48527, #48588, #48801, #48856, #48857
- Failed merges:
@bors bors merged commit a08cfc4 into rust-lang:master Mar 9, 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. WG-epoch Working group: Epoch (2018) management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to gate features on epochs
5 participants