Skip to content

Commit

Permalink
Auto merge of #13272 - linyihai:cargo-add-public-manpage, r=epage
Browse files Browse the repository at this point in the history
doc: add `public` info in `cargo-add` man page.

### What does this PR try to resolve?
follow up #13046
add `public/private` explanation for `cargo-add` in man page.

### How should we test and review this PR?

### Additional information
  • Loading branch information
bors committed Jan 9, 2024
2 parents 8859998 + d973c25 commit 8766536
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/doc/man/cargo-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ Mark the dependency as [optional](../reference/features.html#optional-dependenci
Mark the dependency as [required](../reference/features.html#optional-dependencies).
{{/option}}

{{#option "`--public`" }}
Mark the dependency as public.
{{/option}}

{{#option "`--no-public`" }}
Mark the dependency as private.
{{/option}}

{{#option "`--no-default-features`" }}
Disable the [default features](../reference/features.html#dependency-features).
{{/option}}
Expand Down
6 changes: 6 additions & 0 deletions src/doc/man/generated_txt/cargo-add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ OPTIONS
Mark the dependency as required
<https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies>.

--public
Mark the dependency as public.

--no-public
Mark the dependency as private.

--no-default-features
Disable the default features
<https://doc.rust-lang.org/cargo/reference/features.html#dependency-features>.
Expand Down
8 changes: 8 additions & 0 deletions src/doc/src/commands/cargo-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ which is defined by the <code>registry.default</code> config key which defaults
<dd class="option-desc">Mark the dependency as <a href="../reference/features.html#optional-dependencies">required</a>.</dd>


<dt class="option-term" id="option-cargo-add---public"><a class="option-anchor" href="#option-cargo-add---public"></a><code>--public</code></dt>
<dd class="option-desc">Mark the dependency as public.</dd>


<dt class="option-term" id="option-cargo-add---no-public"><a class="option-anchor" href="#option-cargo-add---no-public"></a><code>--no-public</code></dt>
<dd class="option-desc">Mark the dependency as private.</dd>


<dt class="option-term" id="option-cargo-add---no-default-features"><a class="option-anchor" href="#option-cargo-add---no-default-features"></a><code>--no-default-features</code></dt>
<dd class="option-desc">Disable the <a href="../reference/features.html#dependency-features">default features</a>.</dd>

Expand Down
10 changes: 10 additions & 0 deletions src/etc/man/cargo-add.1
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ Mark the dependency as \fIoptional\fR <https://doc.rust\-lang.org/cargo/referenc
Mark the dependency as \fIrequired\fR <https://doc.rust\-lang.org/cargo/reference/features.html#optional\-dependencies>\&.
.RE
.sp
\fB\-\-public\fR
.RS 4
Mark the dependency as public.
.RE
.sp
\fB\-\-no\-public\fR
.RS 4
Mark the dependency as private.
.RE
.sp
\fB\-\-no\-default\-features\fR
.RS 4
Disable the \fIdefault features\fR <https://doc.rust\-lang.org/cargo/reference/features.html#dependency\-features>\&.
Expand Down

0 comments on commit 8766536

Please sign in to comment.