File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -966,6 +966,15 @@ impl Step for Compiletest {
966
966
/// compiletest `mode` and `suite` arguments. For example `mode` can be
967
967
/// "run-pass" or `suite` can be something like `debuginfo`.
968
968
fn run ( self , builder : & Builder < ' _ > ) {
969
+ if builder. top_stage == 0 && env:: var ( "COMPILETEST_FORCE_STAGE0" ) . is_err ( ) {
970
+ eprintln ! ( "\
971
+ error: `--stage 0` runs compiletest on the beta compiler, not your local changes, and will almost always cause tests to fail
972
+ help: use `--stage 1` instead
973
+ note: if you're sure you want to do this, please open an issue as to why. In the meantime, you can override this with `COMPILETEST_FORCE_STAGE0=1`."
974
+ ) ;
975
+ std:: process:: exit ( 1 ) ;
976
+ }
977
+
969
978
let compiler = self . compiler ;
970
979
let target = self . target ;
971
980
let mode = self . mode ;
You can’t perform that action at this time.
0 commit comments