File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1583,10 +1583,7 @@ pub mod nightly_options {
1583
1583
}
1584
1584
1585
1585
pub fn is_nightly_build ( ) -> bool {
1586
- match get_unstable_features_setting ( ) {
1587
- UnstableFeatures :: Allow | UnstableFeatures :: Cheat => true ,
1588
- _ => false ,
1589
- }
1586
+ UnstableFeatures :: from_environment ( ) . is_nightly_build ( )
1590
1587
}
1591
1588
1592
1589
pub fn check_nightly_options ( matches : & getopts:: Matches , flags : & [ RustcOptGroup ] ) {
Original file line number Diff line number Diff line change @@ -1312,6 +1312,13 @@ impl UnstableFeatures {
1312
1312
( false , _, _) => UnstableFeatures :: Allow
1313
1313
}
1314
1314
}
1315
+
1316
+ pub fn is_nightly_build ( & self ) -> bool {
1317
+ match * self {
1318
+ UnstableFeatures :: Allow | UnstableFeatures :: Cheat => true ,
1319
+ _ => false ,
1320
+ }
1321
+ }
1315
1322
}
1316
1323
1317
1324
fn maybe_stage_features ( span_handler : & Handler , krate : & ast:: Crate ,
You can’t perform that action at this time.
0 commit comments