File tree Expand file tree Collapse file tree 6 files changed +62
-4
lines changed
tests/testsuite/cargo_add/help Expand file tree Collapse file tree 6 files changed +62
-4
lines changed Original file line number Diff line number Diff line change @@ -62,19 +62,23 @@ The package name will be exposed as feature of your crate.")
6262The package will be removed from your features." )
6363 . conflicts_with ( "dev" )
6464 . overrides_with ( "optional" ) ,
65- flag ( "public" , "Mark the dependency as public" )
65+ flag ( "public" , "Mark the dependency as public (unstable) " )
6666 . conflicts_with ( "dev" )
6767 . conflicts_with ( "build" )
6868 . long_help ( "Mark the dependency as public
6969
70- The dependency can be referenced in your library's public API." ) ,
71- flag ( "no-public" , "Mark the dependency as private" )
70+ The dependency can be referenced in your library's public API.
71+
72+ Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency> " ) ,
73+ flag ( "no-public" , "Mark the dependency as private (unstable)" )
7274 . conflicts_with ( "dev" )
7375 . conflicts_with ( "build" )
7476 . overrides_with ( "public" )
7577 . long_help ( "Mark the dependency as private
7678
77- While you can use the crate in your implementation, it cannot be referenced in your public API." ) ,
79+ While you can use the crate in your implementation, it cannot be referenced in your public API.
80+
81+ Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>" ) ,
7882 clap:: Arg :: new ( "rename" )
7983 . long ( "rename" )
8084 . action ( ArgAction :: Set )
Original file line number Diff line number Diff line change @@ -107,6 +107,18 @@ Mark the dependency as [optional](../reference/features.html#optional-dependenci
107107Mark the dependency as [ required] ( ../reference/features.html#optional-dependencies ) .
108108{{/option}}
109109
110+ {{#option "` --public ` " }}
111+ Mark the dependency as public.
112+
113+ [ Unstable (nightly-only)] ( ../reference/unstable.html#public-dependency )
114+ {{/option}}
115+
116+ {{#option "` --no-public ` " }}
117+ Mark the dependency as private.
118+
119+ [ Unstable (nightly-only)] ( ../reference/unstable.html#public-dependency )
120+ {{/option}}
121+
110122{{#option "` --no-default-features ` " }}
111123Disable the [ default features] ( ../reference/features.html#dependency-features ) .
112124{{/option}}
Original file line number Diff line number Diff line change @@ -96,6 +96,18 @@ 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+ Unstable (nightly-only)
103+ <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
104+
105+ --no-public
106+ Mark the dependency as private.
107+
108+ Unstable (nightly-only)
109+ <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
110+
99111 --no-default-features
100112 Disable the default features
101113 <https://doc.rust-lang.org/cargo/reference/features.html#dependency-features>.
Original file line number Diff line number Diff line change @@ -107,6 +107,16 @@ 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. </p >
112+ <p ><a href =" ../reference/unstable.html#public-dependency " >Unstable (nightly-only)</a ></dd >
113+
114+
115+ <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 >
116+ <dd class =" option-desc " >Mark the dependency as private. </p >
117+ <p ><a href =" ../reference/unstable.html#public-dependency " >Unstable (nightly-only)</a ></dd >
118+
119+
110120<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 >
111121<dd class =" option-desc " >Disable the <a href =" ../reference/features.html#dependency-features " >default features</a >.</dd >
112122
Original file line number Diff line number Diff line change @@ -121,6 +121,20 @@ Mark the dependency as \fIoptional\fR <https://doc.rust\-lang.org/cargo/referenc
121121Mark the dependency as \fI required \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+ .sp
128+ \fI Unstable (nightly \- only) \fR <https://doc.rust\- lang.org/cargo/reference/unstable.html#public\- dependency>
129+ .RE
130+ .sp
131+ \fB \-\- no \- public \fR
132+ .RS 4
133+ Mark the dependency as private.
134+ .sp
135+ \fI Unstable (nightly \- only) \fR <https://doc.rust\- lang.org/cargo/reference/unstable.html#public\- dependency>
136+ .RE
137+ .sp
124138\fB \-\- no \- default \- features \fR
125139.RS 4
126140Disable the \fI default features \fR <https://doc.rust\- lang.org/cargo/reference/features.html#dependency\- features>\& .
Original file line number Diff line number Diff line change @@ -36,12 +36,18 @@ Options:
3636 Mark the dependency as public
3737
3838 The dependency can be referenced in your library's public API.
39+
40+ Unstable (nightly-only)
41+ <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
3942
4043 --no-public
4144 Mark the dependency as private
4245
4346 While you can use the crate in your implementation, it cannot be referenced in your public
4447 API.
48+
49+ Unstable (nightly-only)
50+ <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
4551
4652 --rename <NAME>
4753 Rename the dependency
You can’t perform that action at this time.
0 commit comments