Skip to content

Commit 8766536

Browse files
committed
Auto merge of #13272 - linyihai:cargo-add-public-manpage, r=epage
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
2 parents 8859998 + d973c25 commit 8766536

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

src/doc/man/cargo-add.md

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ Mark the dependency as [optional](../reference/features.html#optional-dependenci
107107
Mark the dependency as [required](../reference/features.html#optional-dependencies).
108108
{{/option}}
109109

110+
{{#option "`--public`" }}
111+
Mark the dependency as public.
112+
{{/option}}
113+
114+
{{#option "`--no-public`" }}
115+
Mark the dependency as private.
116+
{{/option}}
117+
110118
{{#option "`--no-default-features`" }}
111119
Disable the [default features](../reference/features.html#dependency-features).
112120
{{/option}}

src/doc/man/generated_txt/cargo-add.txt

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ OPTIONS
9696
Mark the dependency as required
9797
<https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies>.
9898

99+
--public
100+
Mark the dependency as public.
101+
102+
--no-public
103+
Mark the dependency as private.
104+
99105
--no-default-features
100106
Disable the default features
101107
<https://doc.rust-lang.org/cargo/reference/features.html#dependency-features>.

src/doc/src/commands/cargo-add.md

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ which is defined by the <code>registry.default</code> config key which defaults
107107
<dd class="option-desc">Mark the dependency as <a href="../reference/features.html#optional-dependencies">required</a>.</dd>
108108

109109

110+
<dt class="option-term" id="option-cargo-add---public"><a class="option-anchor" href="#option-cargo-add---public"></a><code>--public</code></dt>
111+
<dd class="option-desc">Mark the dependency as public.</dd>
112+
113+
114+
<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>
115+
<dd class="option-desc">Mark the dependency as private.</dd>
116+
117+
110118
<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>
111119
<dd class="option-desc">Disable the <a href="../reference/features.html#dependency-features">default features</a>.</dd>
112120

src/etc/man/cargo-add.1

+10
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ Mark the dependency as \fIoptional\fR <https://doc.rust\-lang.org/cargo/referenc
121121
Mark the dependency as \fIrequired\fR <https://doc.rust\-lang.org/cargo/reference/features.html#optional\-dependencies>\&.
122122
.RE
123123
.sp
124+
\fB\-\-public\fR
125+
.RS 4
126+
Mark the dependency as public.
127+
.RE
128+
.sp
129+
\fB\-\-no\-public\fR
130+
.RS 4
131+
Mark the dependency as private.
132+
.RE
133+
.sp
124134
\fB\-\-no\-default\-features\fR
125135
.RS 4
126136
Disable the \fIdefault features\fR <https://doc.rust\-lang.org/cargo/reference/features.html#dependency\-features>\&.

0 commit comments

Comments
 (0)