diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 97012d2ee16..54b9668df39 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -291,7 +291,7 @@ fn rustc(cx: &mut Context<'_, '_>, unit: &Unit, exec: &Arc) -> Car &mut |line| on_stderr_line(state, line, package_id, &target, &mut output_options), ) .map_err(verbose_if_simple_exit_code) - .chain_err(|| format!("could not compile `{}`.", name))?; + .chain_err(|| format!("could not compile `{}`", name))?; } if rustc_dep_info_loc.exists() { @@ -614,7 +614,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult { &mut |line| on_stderr_line(state, line, package_id, &target, &mut output_options), false, ) - .chain_err(|| format!("Could not document `{}`.", name))?; + .chain_err(|| format!("could not document `{}`", name))?; Ok(()) })) } diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index f4068ae3c19..a4a0eea43b7 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -570,7 +570,7 @@ fn cargo_compile_with_invalid_code() { .with_status(101) .with_stderr_contains( "\ -[ERROR] could not compile `foo`. +[ERROR] could not compile `foo` To learn more, run the command again with --verbose.\n", ) @@ -4669,7 +4669,7 @@ fn signal_display() { "\ [COMPILING] pm [..] [COMPILING] foo [..] -[ERROR] could not compile `foo`. +[ERROR] could not compile `foo` Caused by: process didn't exit successfully: `rustc [..]` (signal: 6, SIGABRT: process abort signal) diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index a54b5eed42b..1aa3481920d 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -1069,7 +1069,7 @@ fn build_deps_not_for_normal() { .with_stderr_contains("[..]can't find crate for `aaaaa`[..]") .with_stderr_contains( "\ -[ERROR] could not compile `foo`. +[ERROR] could not compile `foo` Caused by: process didn't exit successfully: [..] diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 6e7cbc70a60..09ffe720916 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -692,7 +692,7 @@ fn short_message_format() { "\ src/lib.rs:1:27: error[E0308]: mismatched types error: aborting due to previous error -error: could not compile `foo`. +error: could not compile `foo` ", ) .run(); diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index c54cd77c0fc..c91c6ffb6fb 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -25,7 +25,7 @@ fn do_not_fix_broken_builds() { p.cargo("fix --allow-no-vcs") .env("__CARGO_FIX_YOLO", "1") .with_status(101) - .with_stderr_contains("[ERROR] could not compile `foo`.") + .with_stderr_contains("[ERROR] could not compile `foo`") .run(); assert!(p.read_file("src/lib.rs").contains("let mut x = 3;")); } diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index d5fe04194a6..1ef7f3f145c 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -661,7 +661,7 @@ fn compile_failure() { found at `[..]target` Caused by: - could not compile `foo`. + could not compile `foo` To learn more, run the command again with --verbose. ",