File tree 3 files changed +6
-15
lines changed 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 {
1572
1572
1573
1573
pub fn check_nightly_options ( matches : & getopts:: Matches , flags : & [ RustcOptGroup ] ) {
1574
1574
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 ( ) ;
1579
1576
1580
1577
for opt in flags. iter ( ) {
1581
1578
if opt. stability == OptionStability :: Stable {
Original file line number Diff line number Diff line change @@ -649,10 +649,7 @@ impl RustcDefaultCalls {
649
649
}
650
650
}
651
651
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 ( ) ;
656
653
657
654
for cfg in cfg {
658
655
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 {
477
477
let mut data = LangString :: all_false ( ) ;
478
478
let mut allow_compile_fail = false ;
479
479
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
+ }
487
484
488
485
let tokens = string. split ( |c : char |
489
486
!( c == '_' || c == '-' || c. is_alphanumeric ( ) )
You can’t perform that action at this time.
0 commit comments