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 {
15831583 }
15841584
15851585 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 ( )
15901587 }
15911588
15921589 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 {
13121312 ( false , _, _) => UnstableFeatures :: Allow
13131313 }
13141314 }
1315+
1316+ pub fn is_nightly_build ( & self ) -> bool {
1317+ match * self {
1318+ UnstableFeatures :: Allow | UnstableFeatures :: Cheat => true ,
1319+ _ => false ,
1320+ }
1321+ }
13151322}
13161323
13171324fn maybe_stage_features ( span_handler : & Handler , krate : & ast:: Crate ,
You can’t perform that action at this time.
0 commit comments