File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -475,25 +475,17 @@ impl Features {
475
475
SEE_CHANNELS ,
476
476
see_docs( )
477
477
) ,
478
- Status :: Unstable
479
- if !config
480
- . cli_unstable ( )
481
- . allow_features
482
- . as_ref ( )
483
- . map ( |f| f. contains ( feature_name) )
484
- . unwrap_or ( true ) =>
485
- {
486
- bail ! (
487
- "the feature `{}` is not in the list of allowed features: {:?}" ,
488
- feature_name,
489
- config
490
- . cli_unstable( )
491
- . allow_features
492
- . as_ref( )
493
- . expect( "!unwrap_or(true) == false" )
494
- )
478
+ Status :: Unstable => {
479
+ if let Some ( allow) = & config. cli_unstable ( ) . allow_features {
480
+ if !allow. contains ( feature_name) {
481
+ bail ! (
482
+ "the feature `{}` is not in the list of allowed features: {:?}" ,
483
+ feature_name,
484
+ allow,
485
+ ) ;
486
+ }
487
+ }
495
488
}
496
- Status :: Unstable => { }
497
489
Status :: Removed => bail ! (
498
490
"the cargo feature `{}` has been removed\n \
499
491
Remove the feature from Cargo.toml to remove this error.\n \
You can’t perform that action at this time.
0 commit comments