Skip to content

Lowercase and remove periods in error messages for consistency #8655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn rustc(cx: &mut Context<'_, '_>, unit: &Unit, exec: &Arc<dyn Executor>) -> 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() {
Expand Down Expand Up @@ -614,7 +614,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Work> {
&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(())
}))
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: [..]
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;"));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
",
Expand Down