Skip to content

Commit

Permalink
Log details of failure if no errors were seen
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Aug 25, 2024
1 parent 3d2cf56 commit ecfc899
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,17 @@ fn rustc(
)
},
)
.map_err(verbose_if_simple_exit_code)
.map_err(|e| {
if output_options.errors_seen == 0 {
// If we didn't expect an error, do not require --verbose to fail.
// This is intended to debug
// https://github.com/rust-lang/crater/issues/733, where we are seeing
// Cargo exit unsuccessfully while seeming to not show any errors.
e
} else {
verbose_if_simple_exit_code(e)
}
})
.with_context(|| {
// adapted from rustc_errors/src/lib.rs
let warnings = match output_options.warnings_seen {
Expand Down

0 comments on commit ecfc899

Please sign in to comment.