Skip to content

Commit a247257

Browse files
authored
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.
2 parents 377bb73 + a60f627 commit a247257

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bootstrap/flags.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Subcommands:
152152
fmt Run rustfmt
153153
test, t Build and run some test suites
154154
bench Build and run some benchmarks
155-
doc Build documentation
155+
doc, d Build documentation
156156
clean Clean out build directories
157157
dist Build distribution artifacts
158158
install Install distribution artifacts
@@ -244,6 +244,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
244244
|| (s == "t")
245245
|| (s == "bench")
246246
|| (s == "doc")
247+
|| (s == "d")
247248
|| (s == "clean")
248249
|| (s == "dist")
249250
|| (s == "install")
@@ -312,7 +313,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
312313
"clippy" => {
313314
opts.optflag("", "fix", "automatically apply lint suggestions");
314315
}
315-
"doc" => {
316+
"doc" | "d" => {
316317
opts.optflag("", "open", "open the docs in a browser");
317318
}
318319
"clean" => {
@@ -487,7 +488,7 @@ Arguments:
487488
./x.py test --stage 1",
488489
);
489490
}
490-
"doc" => {
491+
"doc" | "d" => {
491492
subcommand_help.push_str(
492493
"\n
493494
Arguments:
@@ -573,7 +574,7 @@ Arguments:
573574
},
574575
},
575576
"bench" => Subcommand::Bench { paths, test_args: matches.opt_strs("test-args") },
576-
"doc" => Subcommand::Doc { paths, open: matches.opt_present("open") },
577+
"doc" | "d" => Subcommand::Doc { paths, open: matches.opt_present("open") },
577578
"clean" => {
578579
if !paths.is_empty() {
579580
println!("\nclean does not take a path argument\n");

0 commit comments

Comments
 (0)