From 9c8a8ea2ca4ebb043ab4895203e3358e69533404 Mon Sep 17 00:00:00 2001 From: Vilem Liepelt <17603372+buggymcbugfix@users.noreply.github.com> Date: Tue, 30 Aug 2022 22:58:34 +0200 Subject: [PATCH] Document cargo-add's feature message This refers to the `Features` part of the message that gets printed to stderr after successfully adding some dependency, e.g.: ``` cargo add my-crate Updating crates.io index Adding my-crate v0.1.0 to dependencies. Features: + foo - bar ``` This tells us that the `foo` feature is enabled and `bar` is disabled. --- src/doc/man/cargo-add.md | 5 +++++ src/doc/man/generated_txt/cargo-add.txt | 4 ++++ src/doc/src/commands/cargo-add.md | 5 +++++ src/etc/man/cargo-add.1 | 3 +++ 4 files changed, 17 insertions(+) diff --git a/src/doc/man/cargo-add.md b/src/doc/man/cargo-add.md index 9f92d7508a2..10c350089c9 100644 --- a/src/doc/man/cargo-add.md +++ b/src/doc/man/cargo-add.md @@ -31,6 +31,11 @@ If no source is specified, then a best effort will be made to select one, includ When you add a package that is already present, the existing entry will be updated with the flags specified. +Upon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified +dependency will be listed in the command's output. + +[features]: ../reference/features.md + ## OPTIONS ### Source options diff --git a/src/doc/man/generated_txt/cargo-add.txt b/src/doc/man/generated_txt/cargo-add.txt index f4a5a14e980..832f53169e1 100644 --- a/src/doc/man/generated_txt/cargo-add.txt +++ b/src/doc/man/generated_txt/cargo-add.txt @@ -32,6 +32,10 @@ DESCRIPTION When you add a package that is already present, the existing entry will be updated with the flags specified. + Upon successful invocation, the enabled (+) and disabled (-) features + of the specified + dependency will be listed in the command's output. + OPTIONS Source options --git url diff --git a/src/doc/src/commands/cargo-add.md b/src/doc/src/commands/cargo-add.md index 619613ba546..da6f6fe2042 100644 --- a/src/doc/src/commands/cargo-add.md +++ b/src/doc/src/commands/cargo-add.md @@ -31,6 +31,11 @@ If no source is specified, then a best effort will be made to select one, includ When you add a package that is already present, the existing entry will be updated with the flags specified. +Upon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified +dependency will be listed in the command's output. + +[features]: ../reference/features.md + ## OPTIONS ### Source options diff --git a/src/etc/man/cargo-add.1 b/src/etc/man/cargo-add.1 index 959aebe602c..147e418d168 100644 --- a/src/etc/man/cargo-add.1 +++ b/src/etc/man/cargo-add.1 @@ -43,6 +43,9 @@ If no source is specified, then a best effort will be made to select one, includ .RE .sp When you add a package that is already present, the existing entry will be updated with the flags specified. +.sp +Upon successful invocation, the enabled (\fB+\fR) and disabled (\fB\-\fR) \fIfeatures\fR of the specified +dependency will be listed in the command's output. .SH "OPTIONS" .SS "Source options" .sp