@@ -1972,27 +1972,15 @@ pub fn build_session_options_and_crate_config(
1972
1972
}
1973
1973
OptLevel :: Default
1974
1974
} else {
1975
- match (
1976
- cg. opt_level . as_ref ( ) . map ( String :: as_ref) ,
1977
- nightly_options:: is_nightly_build ( ) ,
1978
- ) {
1979
- ( None , _) => OptLevel :: No ,
1980
- ( Some ( "0" ) , _) => OptLevel :: No ,
1981
- ( Some ( "1" ) , _) => OptLevel :: Less ,
1982
- ( Some ( "2" ) , _) => OptLevel :: Default ,
1983
- ( Some ( "3" ) , _) => OptLevel :: Aggressive ,
1984
- ( Some ( "s" ) , true ) => OptLevel :: Size ,
1985
- ( Some ( "z" ) , true ) => OptLevel :: SizeMin ,
1986
- ( Some ( "s" ) , false ) | ( Some ( "z" ) , false ) => {
1987
- early_error (
1988
- error_format,
1989
- & format ! (
1990
- "the optimizations s or z are only \
1991
- accepted on the nightly compiler"
1992
- ) ,
1993
- ) ;
1994
- }
1995
- ( Some ( arg) , _) => {
1975
+ match cg. opt_level . as_ref ( ) . map ( String :: as_ref) {
1976
+ None => OptLevel :: No ,
1977
+ Some ( "0" ) => OptLevel :: No ,
1978
+ Some ( "1" ) => OptLevel :: Less ,
1979
+ Some ( "2" ) => OptLevel :: Default ,
1980
+ Some ( "3" ) => OptLevel :: Aggressive ,
1981
+ Some ( "s" ) => OptLevel :: Size ,
1982
+ Some ( "z" ) => OptLevel :: SizeMin ,
1983
+ Some ( arg) => {
1996
1984
early_error (
1997
1985
error_format,
1998
1986
& format ! (
0 commit comments