From 76063a683f2ef7530d07301127027488f1ecec8d Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Wed, 19 Feb 2025 19:25:17 +0300 Subject: print warning and help messages Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/test.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 8d53ebdca19..40f5259133a 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -298,6 +298,11 @@ impl Step for Cargo { /// Runs `cargo test` for `cargo` packaged with Rust. fn run(self, builder: &Builder<'_>) { + if self.stage < 2 { + eprintln!("WARNING: cargo tests on stage {} may not behave well.", self.stage); + eprintln!("HELP: consider using stage 2"); + } + let compiler = builder.compiler(self.stage, self.host); let cargo = builder.ensure(tool::Cargo { compiler, target: self.host }); @@ -743,6 +748,11 @@ impl Step for Clippy { let host = self.host; let compiler = builder.compiler(stage, host); + if stage < 2 { + eprintln!("WARNING: clippy tests on stage {stage} may not behave well."); + eprintln!("HELP: consider using stage 2"); + } + let tool_result = builder.ensure(tool::Clippy { compiler, target: self.host }); let compiler = tool_result.build_compiler; let mut cargo = tool::prepare_tool_cargo( -- cgit 1.4.1-3-g733a5