diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-23 19:27:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-23 19:27:46 +0900 |
| commit | a247257955a1292cc2f05d37ec71f6b2d2f611cf (patch) | |
| tree | e7b2aa273bff5cb6796702f27ee6fdfcddf8421d | |
| parent | 377bb7398902f1c6347f7344e35de08ceda9ec78 (diff) | |
| parent | a60f6275fd5e73651a567e9effceac5c32644420 (diff) | |
Rollup merge of #87362 - inquisitivecrystal:bootstrap-doc, r=jyn514
Make `x.py d` an alias for `x.py doc` In rust-lang/cargo#9680, `d` was added to Cargo as an alias for `doc`. This PR adds the same alias to `x.py`. The same considerations of convenience that applied to Cargo also apply to `x.py`, and in any case, the two should be kept symmetrical.
| -rw-r--r-- | src/bootstrap/flags.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 80a60c79edf..1b7614b2989 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -152,7 +152,7 @@ Subcommands: fmt Run rustfmt test, t Build and run some test suites bench Build and run some benchmarks - doc Build documentation + doc, d Build documentation clean Clean out build directories dist Build distribution artifacts install Install distribution artifacts @@ -244,6 +244,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`", || (s == "t") || (s == "bench") || (s == "doc") + || (s == "d") || (s == "clean") || (s == "dist") || (s == "install") @@ -312,7 +313,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`", "clippy" => { opts.optflag("", "fix", "automatically apply lint suggestions"); } - "doc" => { + "doc" | "d" => { opts.optflag("", "open", "open the docs in a browser"); } "clean" => { @@ -487,7 +488,7 @@ Arguments: ./x.py test --stage 1", ); } - "doc" => { + "doc" | "d" => { subcommand_help.push_str( "\n Arguments: @@ -573,7 +574,7 @@ Arguments: }, }, "bench" => Subcommand::Bench { paths, test_args: matches.opt_strs("test-args") }, - "doc" => Subcommand::Doc { paths, open: matches.opt_present("open") }, + "doc" | "d" => Subcommand::Doc { paths, open: matches.opt_present("open") }, "clean" => { if !paths.is_empty() { println!("\nclean does not take a path argument\n"); |
