Skip to content

Commit ecfc899

Browse files
Log details of failure if no errors were seen
1 parent 3d2cf56 commit ecfc899

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,17 @@ fn rustc(
409409
)
410410
},
411411
)
412-
.map_err(verbose_if_simple_exit_code)
412+
.map_err(|e| {
413+
if output_options.errors_seen == 0 {
414+
// If we didn't expect an error, do not require --verbose to fail.
415+
// This is intended to debug
416+
// https://github.com/rust-lang/crater/issues/733, where we are seeing
417+
// Cargo exit unsuccessfully while seeming to not show any errors.
418+
e
419+
} else {
420+
verbose_if_simple_exit_code(e)
421+
}
422+
})
413423
.with_context(|| {
414424
// adapted from rustc_errors/src/lib.rs
415425
let warnings = match output_options.warnings_seen {

0 commit comments

Comments
 (0)