Skip to content

Commit

Permalink
Auto merge of #7892 - KaneGreen:rustc-about-text, r=ehuss
Browse files Browse the repository at this point in the history
Modified the help information of cargo-rustc

### Motivation
The original help information for `cargo build` is
> Compile a local package and all of its dependencies

And the original help information for `cargo rustc` is
> Compile a package and all of its dependencies

These messages are **too similar** to make it difficult to distinguish the differences between the two commands.

According to the [cargo book](https://doc.rust-lang.org/cargo/commands/cargo-rustc.html), `cargo rustc` is characterized by
> pass extra options to the compiler

I think this should be written into the help text of the command.

In addition, the `<args> ...` parameters of `cargo rustc` lack help text and need to be added.
### Modification
See the commit files.

### Problems
Maybe some words in my modification are not accurate enough. If you have better wording, welcome to point out. Thanks.
  • Loading branch information
bors committed Feb 19, 2020
2 parents c8019b1 + 367fe7b commit 3899434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/cargo/commands/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use cargo::ops;
pub fn cli() -> App {
subcommand("rustc")
.setting(AppSettings::TrailingVarArg)
.about("Compile a package and all of its dependencies")
.about("Compile a package, and pass extra options to the compiler")
.arg(opt("quiet", "No output printed to stdout").short("q"))
.arg(Arg::with_name("args").multiple(true))
.arg(Arg::with_name("args").multiple(true).help("Rustc flags"))
.arg_package("Package to build")
.arg_jobs()
.arg_targets_all(
Expand Down

0 comments on commit 3899434

Please sign in to comment.