Skip to content

Commit

Permalink
Make --edition imply the preview flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed May 4, 2018
1 parent 10f66c7 commit b1951f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libsyntax/feature_gate.rs
Expand Up @@ -1848,6 +1848,12 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],

let mut feature_checker = FeatureChecker::default();

for &(.., f_edition, set) in ACTIVE_FEATURES.iter() {
if f_edition <= crate_edition {
set(&mut features, DUMMY_SP);
}
}

for attr in krate_attrs {
if !attr.check_name("feature") {
continue
Expand Down

0 comments on commit b1951f4

Please sign in to comment.