Skip to content

Commit ffeefb4

Browse files
committed
More descriptive error message in case rustc is killed abruptly
1 parent a671061 commit ffeefb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cargo-auditable/src/rustc_wrapper.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ pub fn main(rustc_path: &OsStr) {
102102
);
103103
std::process::exit(1);
104104
});
105-
std::process::exit(results.code().unwrap());
105+
let code = results
106+
.code()
107+
.expect("rustc was terminated by a deadly signal");
108+
std::process::exit(code);
106109
}
107110

108111
/// Creates a rustc command line and populates arguments from arguments passed to us.

0 commit comments

Comments
 (0)