Skip to content

Commit b296129

Browse files
committed
Auto merge of #6631 - dwijnand:fix-run-help, r=ehuss
Fix run's help message Fixes #3115
2 parents 23fa400 + 96269c2 commit b296129

File tree

10 files changed

+35
-21
lines changed

10 files changed

+35
-21
lines changed

src/bin/cargo/cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Some common cargo commands are (see all commands with --list):
194194
doc Build this package's and its dependencies' documentation
195195
new Create a new cargo package
196196
init Create a new cargo package in an existing directory
197-
run Build and execute src/main.rs
197+
run Run a binary or example of the local package
198198
test Run the tests
199199
bench Run the benchmarks
200200
update Update dependencies listed in Cargo.lock

src/bin/cargo/commands/run.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn cli() -> App {
88
// subcommand aliases are handled in aliased_command()
99
// .alias("r")
1010
.setting(AppSettings::TrailingVarArg)
11-
.about("Run the main binary of the local package (src/main.rs)")
11+
.about("Run a binary or example of the local package")
1212
.arg(Arg::with_name("args").multiple(true))
1313
.arg_targets_bin_example(
1414
"Name of the bin target to run",

src/doc/man/cargo-run.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cargo-run - Run the current package
1313

1414
== DESCRIPTION
1515

16-
Build the the main binary of the local package (`src/main.rs`) and run it.
16+
Run a binary or example of the local package.
1717

1818
All the arguments following the two dashes (`--`) are passed to the binary to
1919
run. If you're passing arguments to both Cargo and the binary, the ones after
@@ -77,7 +77,7 @@ include::section-exit-status.adoc[]
7777

7878
== EXAMPLES
7979

80-
. Build the local package and run its main target:
80+
. Build the local package and run its main target (assuming only one binary):
8181

8282
cargo run
8383

src/doc/man/cargo.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ man:cargo-fix[1]::
4545
Automatically fix lint warnings reported by rustc.
4646

4747
man:cargo-run[1]::
48-
Run a binary of the local package.
48+
Run a binary or example of the local package.
4949

5050
man:cargo-rustc[1]::
5151
Compile a package, and pass extra options to the compiler.

src/doc/man/generated/cargo-metadata.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ <h2 id="cargo_metadata_output_format">OUTPUT FORMAT</h2>
6868
{
6969
/* The name of the dependency. */
7070
"name": "bitflags",
71-
/* The source ID of the dependency. */
71+
/* The source ID of the dependency. May be null, see
72+
description for the package source.
73+
*/
7274
"source": "registry+https://github.com/rust-lang/crates.io-index",
7375
/* The version requirement for the dependency.
7476
Dependencies without a version requirement have a value of "*".
@@ -91,7 +93,12 @@ <h2 id="cargo_metadata_output_format">OUTPUT FORMAT</h2>
9193
/* The target platform for the dependency.
9294
null if not a target dependency.
9395
*/
94-
"target": "cfg(windows)"
96+
"target": "cfg(windows)",
97+
/* A string of the URL of the registry this dependency is from.
98+
If not specified or null, the dependency is from the default
99+
registry (crates.io).
100+
*/
101+
"registry": null
95102
}
96103
],
97104
/* Array of Cargo targets. */

src/doc/man/generated/cargo-run.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h2 id="cargo_run_synopsis">SYNOPSIS</h2>
1414
<h2 id="cargo_run_description">DESCRIPTION</h2>
1515
<div class="sectionbody">
1616
<div class="paragraph">
17-
<p>Build the the main binary of the local package (<code>src/main.rs</code>) and run it.</p>
17+
<p>Run a binary or example of the local package.</p>
1818
</div>
1919
<div class="paragraph">
2020
<p>All the arguments following the two dashes (<code>--</code>) are passed to the binary to
@@ -321,7 +321,7 @@ <h2 id="cargo_run_examples">EXAMPLES</h2>
321321
<div class="olist arabic">
322322
<ol class="arabic">
323323
<li>
324-
<p>Build the local package and run its main target:</p>
324+
<p>Build the local package and run its main target (assuming only one binary):</p>
325325
<div class="literalblock">
326326
<div class="content">
327327
<pre>cargo run</pre>

src/doc/man/generated/cargo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h3 id="_build_commands">Build Commands</h3>
6060
</dd>
6161
<dt class="hdlist1"><a href="commands/cargo-run.html">cargo-run(1)</a></dt>
6262
<dd>
63-
<p>Run a binary of the local package.</p>
63+
<p>Run a binary or example of the local package.</p>
6464
</dd>
6565
<dt class="hdlist1"><a href="commands/cargo-rustc.html">cargo-rustc(1)</a></dt>
6666
<dd>

src/etc/man/cargo-metadata.1

+11-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-metadata
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 1.5.8
5-
.\" Date: 2018-12-23
5+
.\" Date: 2019-01-05
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-METADATA" "1" "2018-12-23" "\ \&" "\ \&"
10+
.TH "CARGO\-METADATA" "1" "2019-01-05" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -82,7 +82,9 @@ The output has the following format:
8282
{
8383
/* The name of the dependency. */
8484
"name": "bitflags",
85-
/* The source ID of the dependency. */
85+
/* The source ID of the dependency. May be null, see
86+
description for the package source.
87+
*/
8688
"source": "registry+https://github.com/rust\-lang/crates.io\-index",
8789
/* The version requirement for the dependency.
8890
Dependencies without a version requirement have a value of "*".
@@ -105,7 +107,12 @@ The output has the following format:
105107
/* The target platform for the dependency.
106108
null if not a target dependency.
107109
*/
108-
"target": "cfg(windows)"
110+
"target": "cfg(windows)",
111+
/* A string of the URL of the registry this dependency is from.
112+
If not specified or null, the dependency is from the default
113+
registry (crates.io).
114+
*/
115+
"registry": null
109116
}
110117
],
111118
/* Array of Cargo targets. */

src/etc/man/cargo-run.1

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-run
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 1.5.8
5-
.\" Date: 2018-12-20
5+
.\" Date: 2019-02-05
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-RUN" "1" "2018-12-20" "\ \&" "\ \&"
10+
.TH "CARGO\-RUN" "1" "2019-02-05" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -34,7 +34,7 @@ cargo\-run \- Run the current package
3434
\fBcargo run [\fIOPTIONS\fP] [\-\- \fIARGS\fP]\fP
3535
.SH "DESCRIPTION"
3636
.sp
37-
Build the the main binary of the local package (\fBsrc/main.rs\fP) and run it.
37+
Run a binary or example of the local package.
3838
.sp
3939
All the arguments following the two dashes (\fB\-\-\fP) are passed to the binary to
4040
run. If you\(cqre passing arguments to both Cargo and the binary, the ones after
@@ -328,7 +328,7 @@ Cargo failed to complete.
328328
. sp -1
329329
. IP " 1." 4.2
330330
.\}
331-
Build the local package and run its main target:
331+
Build the local package and run its main target (assuming only one binary):
332332
.sp
333333
.if n .RS 4
334334
.nf

src/etc/man/cargo.1

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 1.5.8
5-
.\" Date: 2018-12-20
5+
.\" Date: 2019-02-05
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO" "1" "2018-12-20" "\ \&" "\ \&"
10+
.TH "CARGO" "1" "2019-02-05" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -85,7 +85,7 @@ Automatically fix lint warnings reported by rustc.
8585
.sp
8686
\fBcargo\-run\fP(1)
8787
.RS 4
88-
Run a binary of the local package.
88+
Run a binary or example of the local package.
8989
.RE
9090
.sp
9191
\fBcargo\-rustc\fP(1)

0 commit comments

Comments
 (0)