Skip to content

Commit b1951f4

Browse files
committed
Make --edition imply the preview flag
1 parent 10f66c7 commit b1951f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,12 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
18481848

18491849
let mut feature_checker = FeatureChecker::default();
18501850

1851+
for &(.., f_edition, set) in ACTIVE_FEATURES.iter() {
1852+
if f_edition <= crate_edition {
1853+
set(&mut features, DUMMY_SP);
1854+
}
1855+
}
1856+
18511857
for attr in krate_attrs {
18521858
if !attr.check_name("feature") {
18531859
continue

0 commit comments

Comments
 (0)