Skip to content

Commit 76063a6

Browse files
committedFeb 19, 2025
print warning and help messages
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 4b9b5d7 commit 76063a6

File tree

1 file changed

+10
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+10
-0
lines changed
 

‎src/bootstrap/src/core/build_steps/test.rs

+10
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ impl Step for Cargo {
298298

299299
/// Runs `cargo test` for `cargo` packaged with Rust.
300300
fn run(self, builder: &Builder<'_>) {
301+
if self.stage < 2 {
302+
eprintln!("WARNING: cargo tests on stage {} may not behave well.", self.stage);
303+
eprintln!("HELP: consider using stage 2");
304+
}
305+
301306
let compiler = builder.compiler(self.stage, self.host);
302307

303308
let cargo = builder.ensure(tool::Cargo { compiler, target: self.host });
@@ -743,6 +748,11 @@ impl Step for Clippy {
743748
let host = self.host;
744749
let compiler = builder.compiler(stage, host);
745750

751+
if stage < 2 {
752+
eprintln!("WARNING: clippy tests on stage {stage} may not behave well.");
753+
eprintln!("HELP: consider using stage 2");
754+
}
755+
746756
let tool_result = builder.ensure(tool::Clippy { compiler, target: self.host });
747757
let compiler = tool_result.build_compiler;
748758
let mut cargo = tool::prepare_tool_cargo(

0 commit comments

Comments
 (0)