From 8e7c0ab8d8ef6e48f0509410fee2056d6e635470 Mon Sep 17 00:00:00 2001 From: Camelid <37223377+camelid@users.noreply.github.com> Date: Wed, 26 Aug 2020 18:51:36 -0700 Subject: [PATCH 1/3] Lowercase docs error message for consistency --- src/cargo/core/compiler/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 97012d2ee16..45aa272f7c5 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -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(()) })) } From a9424d978a966b5141c46a47998ac0a7cc0bd6ae Mon Sep 17 00:00:00 2001 From: Camelid <37223377+camelid@users.noreply.github.com> Date: Wed, 26 Aug 2020 19:51:53 -0700 Subject: [PATCH 2/3] Remove periods from error messages --- src/cargo/core/compiler/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 45aa272f7c5..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(()) })) } From 82c834cec257cd04785b5bd7d40e29e8dd35b38b Mon Sep 17 00:00:00 2001 From: Camelid Date: Mon, 7 Sep 2020 10:57:00 -0700 Subject: [PATCH 3/3] Update tests --- tests/testsuite/build.rs | 4 ++-- tests/testsuite/build_script.rs | 2 +- tests/testsuite/check.rs | 2 +- tests/testsuite/fix.rs | 2 +- tests/testsuite/install.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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. ",