File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
# These defaults are meant for contributors to the standard library and documentation.
2
2
[build ]
3
3
bench-stage = 1
4
- build-stage = 1
5
4
check-stage = 1
6
5
test-stage = 1
7
6
Original file line number Diff line number Diff line change @@ -980,7 +980,7 @@ impl Config {
980
980
|| install_stage. is_some ( )
981
981
|| check_stage. is_some ( )
982
982
|| bench_stage. is_some ( ) ;
983
- // See https://github.com/rust-lang/compiler-team/issues/326
983
+
984
984
config. stage = match config. cmd {
985
985
Subcommand :: Check { .. } => flags. stage . or ( check_stage) . unwrap_or ( 0 ) ,
986
986
Subcommand :: Clippy { .. } | Subcommand :: Fix => flags. stage . or ( check_stage) . unwrap_or ( 1 ) ,
@@ -1008,6 +1008,15 @@ impl Config {
1008
1008
| Subcommand :: Vendor { .. } => flags. stage . unwrap_or ( 0 ) ,
1009
1009
} ;
1010
1010
1011
+ // Now check that the selected stage makes sense, and if not, print a warning and end
1012
+ match ( config. stage , & config. cmd ) {
1013
+ ( 0 , Subcommand :: Build ) => {
1014
+ eprintln ! ( "WARNING: cannot build anything on stage 0. Use at least stage 1." ) ;
1015
+ exit ! ( 1 )
1016
+ }
1017
+ _ => { }
1018
+ }
1019
+
1011
1020
// CI should always run stage 2 builds, unless it specifically states otherwise
1012
1021
#[ cfg( not( test) ) ]
1013
1022
if flags. stage . is_none ( ) && config. is_running_on_ci {
You can’t perform that action at this time.
0 commit comments