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 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 @@ -1023,7 +1023,7 @@ impl Config {
1023
1023
|| install_stage. is_some ( )
1024
1024
|| check_stage. is_some ( )
1025
1025
|| bench_stage. is_some ( ) ;
1026
- // See https://github.com/rust-lang/compiler-team/issues/326
1026
+
1027
1027
config. stage = match config. cmd {
1028
1028
Subcommand :: Check { .. } => flags_stage. or ( check_stage) . unwrap_or ( 0 ) ,
1029
1029
Subcommand :: Clippy { .. } | Subcommand :: Fix => flags_stage. or ( check_stage) . unwrap_or ( 1 ) ,
@@ -1051,6 +1051,12 @@ impl Config {
1051
1051
| Subcommand :: Vendor { .. } => flags_stage. unwrap_or ( 0 ) ,
1052
1052
} ;
1053
1053
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
+
1054
1060
// CI should always run stage 2 builds, unless it specifically states otherwise
1055
1061
#[ cfg( not( test) ) ]
1056
1062
if flags_stage. is_none ( ) && config. is_running_on_ci {
You can’t perform that action at this time.
0 commit comments