Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/cargo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d973c2595372907f9aa5b6855dc555b3edef7b4b
Choose a base ref
..
head repository: rust-lang/cargo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ee34a27339baa8ea253e135bc84c8458190e825a
Choose a head ref
Showing with 28 additions and 8 deletions.
  1. +6 −2 src/bin/cargo/commands/add.rs
  2. +6 −2 src/doc/man/cargo-add.md
  3. +6 −0 src/doc/man/generated_txt/cargo-add.txt
  4. +4 −2 src/doc/src/commands/cargo-add.md
  5. +6 −2 src/etc/man/cargo-add.1
8 changes: 6 additions & 2 deletions src/bin/cargo/commands/add.rs
Original file line number Diff line number Diff line change
@@ -67,14 +67,18 @@ The package will be removed from your features.")
.conflicts_with("build")
.long_help("Mark the dependency as public
The dependency can be referenced in your library's public API."),
The dependency can be referenced in your library's public API.
Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>"),
flag("no-public", "Mark the dependency as private")
.conflicts_with("dev")
.conflicts_with("build")
.overrides_with("public")
.long_help("Mark the dependency as private
While you can use the crate in your implementation, it cannot be referenced in your public API."),
While you can use the crate in your implementation, it cannot be referenced in your public API.
Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>"),
clap::Arg::new("rename")
.long("rename")
.action(ArgAction::Set)
8 changes: 6 additions & 2 deletions src/doc/man/cargo-add.md
Original file line number Diff line number Diff line change
@@ -108,11 +108,15 @@ Mark the dependency as [required](../reference/features.html#optional-dependenci
{{/option}}

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

[Unstable (nightly-only)](../reference/unstable.html#public-dependency)
{{/option}}

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

[Unstable (nightly-only)](../reference/unstable.html#public-dependency)
{{/option}}

{{#option "`--no-default-features`" }}
6 changes: 6 additions & 0 deletions src/doc/man/generated_txt/cargo-add.txt
Original file line number Diff line number Diff line change
@@ -99,9 +99,15 @@ OPTIONS
--public
Mark the dependency as public.

Unstable (nightly-only)
<https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>

--no-public
Mark the dependency as private.

Unstable (nightly-only)
<https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>

--no-default-features
Disable the default features
<https://doc.rust-lang.org/cargo/reference/features.html#dependency-features>.
6 changes: 4 additions & 2 deletions src/doc/src/commands/cargo-add.md
Original file line number Diff line number Diff line change
@@ -108,11 +108,13 @@ which is defined by the <code>registry.default</code> config key which defaults


<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>
<dd class="option-desc">Mark the dependency as public. </p>
<p><a href="../reference/unstable.html#public-dependency">Unstable (nightly-only)</a></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>
<dd class="option-desc">Mark the dependency as private. </p>
<p><a href="../reference/unstable.html#public-dependency">Unstable (nightly-only)</a></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>
8 changes: 6 additions & 2 deletions src/etc/man/cargo-add.1
Original file line number Diff line number Diff line change
@@ -123,12 +123,16 @@ Mark the dependency as \fIrequired\fR <https://doc.rust\-lang.org/cargo/referenc
.sp
\fB\-\-public\fR
.RS 4
Mark the dependency as public.
Mark the dependency as public.
.sp
\fIUnstable (nightly\-only)\fR <https://doc.rust\-lang.org/cargo/reference/unstable.html#public\-dependency>
.RE
.sp
\fB\-\-no\-public\fR
.RS 4
Mark the dependency as private.
Mark the dependency as private.
.sp
\fIUnstable (nightly\-only)\fR <https://doc.rust\-lang.org/cargo/reference/unstable.html#public\-dependency>
.RE
.sp
\fB\-\-no\-default\-features\fR