mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(compile): Match rustc style guide for help message casing
This commit is contained in:
parent
86dcd23f8e
commit
7bf7b2f684
@ -275,7 +275,7 @@ impl<'a> UnitGenerator<'a, '_> {
|
||||
for (package, targets) in &targets_elsewhere {
|
||||
if !targets.is_empty() {
|
||||
available_msg.push(format!(
|
||||
"help: Available {target_desc} in `{package}` package:"
|
||||
"help: available {target_desc} in `{package}` package:"
|
||||
));
|
||||
for target in targets {
|
||||
available_msg.push(format!(" {target}"));
|
||||
@ -314,7 +314,7 @@ impl<'a> UnitGenerator<'a, '_> {
|
||||
if !targets_elsewhere.is_empty() {
|
||||
append_targets_elsewhere(&mut msg)?;
|
||||
} else if suggestion.is_empty() && !targets.is_empty() {
|
||||
write!(msg, "\nAvailable {} targets:", target_desc)?;
|
||||
write!(msg, "\navailable {} targets:", target_desc)?;
|
||||
for target in targets {
|
||||
write!(msg, "\n {}", target.name())?;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ fn cargo_compile_with_filename() {
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no bin target named `bin.rs` in default-run packages
|
||||
Available bin targets:
|
||||
available bin targets:
|
||||
a
|
||||
|
||||
"#]])
|
||||
@ -1358,7 +1358,7 @@ Available bin targets:
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no example target named `example.rs` in default-run packages
|
||||
Available example targets:
|
||||
available example targets:
|
||||
a
|
||||
|
||||
"#]])
|
||||
|
@ -624,7 +624,7 @@ automatically infer them to be a target, such as in subfolders.
|
||||
For more information on this warning you can consult
|
||||
https://github.com/rust-lang/cargo/issues/5330
|
||||
[ERROR] no example target named `a` in default-run packages
|
||||
Available example targets:
|
||||
available example targets:
|
||||
do_magic
|
||||
|
||||
"#]])
|
||||
@ -655,7 +655,7 @@ fn run_example_autodiscover_2015_with_autoexamples_disabled() {
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no example target named `a` in default-run packages
|
||||
Available example targets:
|
||||
available example targets:
|
||||
do_magic
|
||||
|
||||
"#]])
|
||||
@ -742,7 +742,7 @@ fn run_with_filename() {
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no bin target named `bin.rs` in default-run packages
|
||||
Available bin targets:
|
||||
available bin targets:
|
||||
a
|
||||
|
||||
"#]])
|
||||
@ -762,7 +762,7 @@ Available bin targets:
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no example target named `example.rs` in default-run packages
|
||||
Available example targets:
|
||||
available example targets:
|
||||
a
|
||||
|
||||
"#]])
|
||||
@ -844,7 +844,7 @@ fn ambiguous_bin_name() {
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no bin target named `crate1/ambiguous` in default-run packages
|
||||
Available bin targets:
|
||||
available bin targets:
|
||||
ambiguous
|
||||
ambiguous
|
||||
ambiguous
|
||||
@ -937,7 +937,7 @@ Available binaries:
|
||||
[ERROR] no bin target named `crate2` in `crate1` package
|
||||
|
||||
[HELP] a target with a similar name exists: `crate1`
|
||||
[HELP] Available bin in `crate2` package:
|
||||
[HELP] available bin in `crate2` package:
|
||||
crate2
|
||||
|
||||
"#]])
|
||||
@ -949,7 +949,7 @@ Available binaries:
|
||||
[ERROR] no bin target named `crate2` in `crate1`, ... packages
|
||||
|
||||
[HELP] a target with a similar name exists: `crate1`
|
||||
[HELP] Available bin in `crate2` package:
|
||||
[HELP] available bin in `crate2` package:
|
||||
crate2
|
||||
|
||||
"#]])
|
||||
@ -961,7 +961,7 @@ Available binaries:
|
||||
[ERROR] no bin target named `crate2` in default-run packages
|
||||
|
||||
[HELP] a target with a similar name exists: `crate1`
|
||||
[HELP] Available bin in `crate2` package:
|
||||
[HELP] available bin in `crate2` package:
|
||||
crate2
|
||||
|
||||
"#]])
|
||||
@ -971,9 +971,9 @@ Available binaries:
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no bin target matches pattern `pattern*` in default-run packages
|
||||
[HELP] Available bin in `pattern1` package:
|
||||
[HELP] available bin in `pattern1` package:
|
||||
pattern1
|
||||
[HELP] Available bin in `pattern2` package:
|
||||
[HELP] available bin in `pattern2` package:
|
||||
pattern2
|
||||
|
||||
"#]])
|
||||
@ -996,7 +996,7 @@ Available binaries:
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no bin target named `crate2` in default-run packages
|
||||
[HELP] Available bin in `crate2` package:
|
||||
[HELP] available bin in `crate2` package:
|
||||
crate2
|
||||
|
||||
"#]])
|
||||
|
Loading…
x
Reference in New Issue
Block a user