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