diff --git a/src/bin/cargo/commands/add.rs b/src/bin/cargo/commands/add.rs
index 55a07428202..f4d2ee051c4 100644
--- a/src/bin/cargo/commands/add.rs
+++ b/src/bin/cargo/commands/add.rs
@@ -62,17 +62,17 @@ The package name will be exposed as feature of your crate.")
The package will be removed from your features.")
.conflicts_with("dev")
.overrides_with("optional"),
- flag("public", "Mark the dependency as public")
+ flag("public", "Mark the dependency as public (unstable)")
.conflicts_with("dev")
.conflicts_with("build")
- .long_help("Mark the dependency as public
+ .long_help("Mark the dependency as public (unstable)
The dependency can be referenced in your library's public API."),
- flag("no-public", "Mark the dependency as private")
+ flag("no-public", "Mark the dependency as private (unstable)")
.conflicts_with("dev")
.conflicts_with("build")
.overrides_with("public")
- .long_help("Mark the dependency as private
+ .long_help("Mark the dependency as private (unstable)
While you can use the crate in your implementation, it cannot be referenced in your public API."),
clap::Arg::new("rename")
diff --git a/src/doc/man/cargo-add.md b/src/doc/man/cargo-add.md
index d3a62900a06..96ac12b0dbc 100644
--- a/src/doc/man/cargo-add.md
+++ b/src/doc/man/cargo-add.md
@@ -107,6 +107,22 @@ 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.
+
+The dependency can be referenced in your library's public API.
+
+[Unstable (nightly-only)](../reference/unstable.html#public-dependency)
+{{/option}}
+
+{{#option "`--no-public`" }}
+Mark the dependency as private.
+
+While you can use the crate in your implementation, it cannot be referenced in your public API.
+
+[Unstable (nightly-only)](../reference/unstable.html#public-dependency)
+{{/option}}
+
{{#option "`--no-default-features`" }}
Disable the [default features](../reference/features.html#dependency-features).
{{/option}}
diff --git a/src/doc/man/generated_txt/cargo-add.txt b/src/doc/man/generated_txt/cargo-add.txt
index 3bd4bd5aa91..d9ec429c21a 100644
--- a/src/doc/man/generated_txt/cargo-add.txt
+++ b/src/doc/man/generated_txt/cargo-add.txt
@@ -96,6 +96,23 @@ OPTIONS
Mark the dependency as required
registry.default
config key which defaults
--public
The dependency can be referenced in your library’s public API.
+Unstable (nightly-only) + + +
--no-public
While you can use the crate in your implementation, it cannot be referenced in your public API.
+--no-default-features