File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -1572,10 +1572,7 @@ pub mod nightly_options {
15721572
15731573 pub fn check_nightly_options ( matches : & getopts:: Matches , flags : & [ RustcOptGroup ] ) {
15741574 let has_z_unstable_option = matches. opt_strs ( "Z" ) . iter ( ) . any ( |x| * x == "unstable-options" ) ;
1575- let really_allows_unstable_options = match UnstableFeatures :: from_environment ( ) {
1576- UnstableFeatures :: Disallow => false ,
1577- _ => true ,
1578- } ;
1575+ let really_allows_unstable_options = UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ;
15791576
15801577 for opt in flags. iter ( ) {
15811578 if opt. stability == OptionStability :: Stable {
Original file line number Diff line number Diff line change @@ -649,10 +649,7 @@ impl RustcDefaultCalls {
649649 }
650650 }
651651 PrintRequest :: Cfg => {
652- let allow_unstable_cfg = match UnstableFeatures :: from_environment ( ) {
653- UnstableFeatures :: Disallow => false ,
654- _ => true ,
655- } ;
652+ let allow_unstable_cfg = UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ;
656653
657654 for cfg in cfg {
658655 if !allow_unstable_cfg && GatedCfg :: gate ( & * cfg) . is_some ( ) {
Original file line number Diff line number Diff line change @@ -477,13 +477,10 @@ impl LangString {
477477 let mut data = LangString :: all_false ( ) ;
478478 let mut allow_compile_fail = false ;
479479 let mut allow_error_code_check = false ;
480- match UnstableFeatures :: from_environment ( ) {
481- UnstableFeatures :: Allow | UnstableFeatures :: Cheat => {
482- allow_compile_fail = true ;
483- allow_error_code_check = true ;
484- }
485- _ => { } ,
486- } ;
480+ if UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) {
481+ allow_compile_fail = true ;
482+ allow_error_code_check = true ;
483+ }
487484
488485 let tokens = string. split ( |c : char |
489486 !( c == '_' || c == '-' || c. is_alphanumeric ( ) )
You can’t perform that action at this time.
0 commit comments