@@ -67,16 +67,14 @@ impl Step for Std {
67
67
let target = self . target ;
68
68
let compiler = self . compiler ;
69
69
70
- if let Some ( keep_stage) = builder. config . keep_stage {
71
- if keep_stage <= compiler. stage {
72
- println ! ( "Warning: Using a potentially old libstd. This may not behave well." ) ;
73
- builder. ensure ( StdLink {
74
- compiler : compiler,
75
- target_compiler : compiler,
76
- target,
77
- } ) ;
78
- return ;
79
- }
70
+ if builder. config . keep_stage . contains ( & compiler. stage ) {
71
+ builder. info ( "Warning: Using a potentially old libstd. This may not behave well." ) ;
72
+ builder. ensure ( StdLink {
73
+ compiler : compiler,
74
+ target_compiler : compiler,
75
+ target,
76
+ } ) ;
77
+ return ;
80
78
}
81
79
82
80
builder. ensure ( StartupObjects { compiler, target } ) ;
@@ -362,20 +360,18 @@ impl Step for Test {
362
360
let target = self . target ;
363
361
let compiler = self . compiler ;
364
362
365
- if let Some ( keep_stage) = builder. config . keep_stage {
366
- if keep_stage <= compiler. stage {
367
- println ! ( "Warning: Using a potentially old libtest. This may not behave well." ) ;
368
- builder. ensure ( TestLink {
369
- compiler : compiler,
370
- target_compiler : compiler,
371
- target,
372
- } ) ;
373
- return ;
374
- }
375
- }
376
-
377
363
builder. ensure ( Std { compiler, target } ) ;
378
364
365
+ if builder. config . keep_stage . contains ( & compiler. stage ) {
366
+ builder. info ( "Warning: Using a potentially old libtest. This may not behave well." ) ;
367
+ builder. ensure ( TestLink {
368
+ compiler : compiler,
369
+ target_compiler : compiler,
370
+ target,
371
+ } ) ;
372
+ return ;
373
+ }
374
+
379
375
if builder. force_use_stage1 ( compiler, target) {
380
376
builder. ensure ( Test {
381
377
compiler : builder. compiler ( 1 , builder. config . build ) ,
@@ -490,20 +486,18 @@ impl Step for Rustc {
490
486
let compiler = self . compiler ;
491
487
let target = self . target ;
492
488
493
- if let Some ( keep_stage) = builder. config . keep_stage {
494
- if keep_stage <= compiler. stage {
495
- println ! ( "Warning: Using a potentially old librustc. This may not behave well." ) ;
496
- builder. ensure ( RustcLink {
497
- compiler : compiler,
498
- target_compiler : compiler,
499
- target,
500
- } ) ;
501
- return ;
502
- }
503
- }
504
-
505
489
builder. ensure ( Test { compiler, target } ) ;
506
490
491
+ if builder. config . keep_stage . contains ( & compiler. stage ) {
492
+ builder. info ( "Warning: Using a potentially old librustc. This may not behave well." ) ;
493
+ builder. ensure ( RustcLink {
494
+ compiler : compiler,
495
+ target_compiler : compiler,
496
+ target,
497
+ } ) ;
498
+ return ;
499
+ }
500
+
507
501
if builder. force_use_stage1 ( compiler, target) {
508
502
builder. ensure ( Rustc {
509
503
compiler : builder. compiler ( 1 , builder. config . build ) ,
@@ -660,14 +654,12 @@ impl Step for CodegenBackend {
660
654
661
655
builder. ensure ( Rustc { compiler, target } ) ;
662
656
663
- if let Some ( keep_stage) = builder. config . keep_stage {
664
- if keep_stage <= compiler. stage {
665
- println ! ( "Warning: Using a potentially old codegen backend. \
666
- This may not behave well.") ;
667
- // Codegen backends are linked separately from this step today, so we don't do
668
- // anything here.
669
- return ;
670
- }
657
+ if builder. config . keep_stage . contains ( & compiler. stage ) {
658
+ builder. info ( "Warning: Using a potentially old codegen backend. \
659
+ This may not behave well.") ;
660
+ // Codegen backends are linked separately from this step today, so we don't do
661
+ // anything here.
662
+ return ;
671
663
}
672
664
673
665
if builder. force_use_stage1 ( compiler, target) {
0 commit comments