-
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
Add functionality for gating feature flags on epochs ; rejigger epoch lints #48801
Conversation
83f60ca
to
f249692
Compare
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.
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 { |
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.
Can we make a test?
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.
e.g., // compile-flags: -Zepoch=2018
, and then use dyn Trait
☔ The latest upstream changes (presumably #46882) made this pull request unmergeable. Please resolve the merge conflicts. |
5baa8bb
to
fc5ad32
Compare
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?) |
779c10c
to
9272579
Compare
9272579
to
d9f0c16
Compare
pub trait Foo {} | ||
|
||
// should compile without the dyn trait feature flag | ||
fn foo(x: &dyn Foo) {} |
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.
<3
@bors r+ |
📌 Commit d9f0c16 has been approved by |
☔ The latest upstream changes (presumably #48849) made this pull request unmergeable. Please resolve the merge conflicts. |
d9f0c16
to
a08cfc4
Compare
@bors r=nikomatsakis |
📌 Commit a08cfc4 has been approved by |
…atsakis Add functionality for gating feature flags on epochs ; rejigger epoch lints fixes rust-lang#48794 r? @nikomatsakis
fixes #48794
r? @nikomatsakis