@@ -1022,7 +1022,7 @@ impl Config {
1022
1022
|| bench_stage. is_some ( ) ;
1023
1023
1024
1024
config. stage = match config. cmd {
1025
- Subcommand :: Check { .. } => flags_stage. or ( check_stage) . unwrap_or ( 0 ) ,
1025
+ Subcommand :: Check { .. } => flags_stage. or ( check_stage) . unwrap_or ( 1 ) ,
1026
1026
Subcommand :: Clippy { .. } | Subcommand :: Fix => flags_stage. or ( check_stage) . unwrap_or ( 1 ) ,
1027
1027
// `download-rustc` only has a speed-up for stage2 builds. Default to stage2 unless explicitly overridden.
1028
1028
Subcommand :: Doc { .. } => {
@@ -1049,9 +1049,16 @@ impl Config {
1049
1049
} ;
1050
1050
1051
1051
// Now check that the selected stage makes sense, and if not, print a warning and end
1052
- if let ( 0 , Subcommand :: Build ) = ( config. stage , & config. cmd ) {
1053
- eprintln ! ( "WARNING: cannot build anything on stage 0. Use at least stage 1." ) ;
1054
- exit ! ( 1 ) ;
1052
+ match ( config. stage , & config. cmd ) {
1053
+ ( 0 , Subcommand :: Build ) => {
1054
+ eprintln ! ( "WARNING: cannot build anything on stage 0. Use at least stage 1." ) ;
1055
+ exit ! ( 1 ) ;
1056
+ }
1057
+ ( 0 , Subcommand :: Check { .. } ) => {
1058
+ eprintln ! ( "WARNING: cannot check anything on stage 0. Use at least stage 1." ) ;
1059
+ exit ! ( 1 ) ;
1060
+ }
1061
+ _ => { }
1055
1062
}
1056
1063
1057
1064
// CI should always run stage 2 builds, unless it specifically states otherwise
0 commit comments