@@ -67,16 +67,14 @@ impl Step for Std {
6767 let target = self . target ;
6868 let compiler = self . compiler ;
6969
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 ;
8078 }
8179
8280 builder. ensure ( StartupObjects { compiler, target } ) ;
@@ -362,20 +360,18 @@ impl Step for Test {
362360 let target = self . target ;
363361 let compiler = self . compiler ;
364362
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-
377363 builder. ensure ( Std { compiler, target } ) ;
378364
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+
379375 if builder. force_use_stage1 ( compiler, target) {
380376 builder. ensure ( Test {
381377 compiler : builder. compiler ( 1 , builder. config . build ) ,
@@ -490,20 +486,18 @@ impl Step for Rustc {
490486 let compiler = self . compiler ;
491487 let target = self . target ;
492488
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-
505489 builder. ensure ( Test { compiler, target } ) ;
506490
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+
507501 if builder. force_use_stage1 ( compiler, target) {
508502 builder. ensure ( Rustc {
509503 compiler : builder. compiler ( 1 , builder. config . build ) ,
@@ -660,14 +654,12 @@ impl Step for CodegenBackend {
660654
661655 builder. ensure ( Rustc { compiler, target } ) ;
662656
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 ;
671663 }
672664
673665 if builder. force_use_stage1 ( compiler, target) {
0 commit comments