Skip to content
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

Tweak build help to clarify role of --bin #12157

Merged
merged 2 commits into from
May 20, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Reorder flags in help to give bin context
It's not clear that bin is a singular of bins rather than the opposite of lib
  • Loading branch information
kornelski committed May 18, 2023
commit 75a1dd03075b325fc4ba0ec977fe7b641a63ace1
8 changes: 4 additions & 4 deletions src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ pub trait CommandExt: Sized {
all: &'static str,
) -> Self {
self.arg_targets_lib_bin_example(lib, bin, bins, example, examples)
._arg(optional_multi_opt("test", "NAME", test))
._arg(flag("tests", tests))
._arg(optional_multi_opt("bench", "NAME", bench))
._arg(optional_multi_opt("test", "NAME", test))
._arg(flag("benches", benches))
._arg(optional_multi_opt("bench", "NAME", bench))
._arg(flag("all-targets", all))
}

Expand All @@ -107,10 +107,10 @@ pub trait CommandExt: Sized {
examples: &'static str,
) -> Self {
self._arg(flag("lib", lib))
._arg(optional_multi_opt("bin", "NAME", bin))
._arg(flag("bins", bins))
._arg(optional_multi_opt("example", "NAME", example))
._arg(optional_multi_opt("bin", "NAME", bin))
._arg(flag("examples", examples))
._arg(optional_multi_opt("example", "NAME", example))
}

fn arg_targets_bins_examples(
Expand Down