File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# These defaults are meant for contributors to the standard library and documentation.
22[build ]
33bench-stage = 1
4- build-stage = 1
54check-stage = 1
65test-stage = 1
76
Original file line number Diff line number Diff line change @@ -1023,7 +1023,7 @@ impl Config {
10231023 || install_stage. is_some ( )
10241024 || check_stage. is_some ( )
10251025 || bench_stage. is_some ( ) ;
1026- // See https://github.com/rust-lang/compiler-team/issues/326
1026+
10271027 config. stage = match config. cmd {
10281028 Subcommand :: Check { .. } => flags_stage. or ( check_stage) . unwrap_or ( 0 ) ,
10291029 Subcommand :: Clippy { .. } | Subcommand :: Fix => flags_stage. or ( check_stage) . unwrap_or ( 1 ) ,
@@ -1051,6 +1051,12 @@ impl Config {
10511051 | Subcommand :: Vendor { .. } => flags_stage. unwrap_or ( 0 ) ,
10521052 } ;
10531053
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 ) ;
1058+ }
1059+
10541060 // CI should always run stage 2 builds, unless it specifically states otherwise
10551061 #[ cfg( not( test) ) ]
10561062 if flags_stage. is_none ( ) && config. is_running_on_ci {
You can’t perform that action at this time.
0 commit comments