Skip to content

Commit 95795ca

Browse files
authored
Rollup merge of rust-lang#55867 - RalfJung:dont-panic, r=Mark-Simulacrum
do not panic just because cargo failed Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43). Fixes rust-lang#53379
2 parents 3556d98 + b7c319c commit 95795ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/compile.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::fs::{self, File};
2222
use std::io::BufReader;
2323
use std::io::prelude::*;
2424
use std::path::{Path, PathBuf};
25-
use std::process::{Command, Stdio};
25+
use std::process::{Command, Stdio, exit};
2626
use std::str;
2727

2828
use build_helper::{output, mtime, up_to_date};
@@ -1098,7 +1098,7 @@ pub fn run_cargo(builder: &Builder,
10981098
});
10991099

11001100
if !ok {
1101-
panic!("cargo must succeed");
1101+
exit(1);
11021102
}
11031103

11041104
// Ok now we need to actually find all the files listed in `toplevel`. We've

0 commit comments

Comments
 (0)