Skip to content

Commit 9c8a8ea

Browse files
committedAug 30, 2022
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.
1 parent 4ed54ce commit 9c8a8ea

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
 

‎src/doc/man/cargo-add.md

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ If no source is specified, then a best effort will be made to select one, includ
3131

3232
When you add a package that is already present, the existing entry will be updated with the flags specified.
3333

34+
Upon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified
35+
dependency will be listed in the command's output.
36+
37+
[features]: ../reference/features.md
38+
3439
## OPTIONS
3540

3641
### Source options

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

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ DESCRIPTION
3232
When you add a package that is already present, the existing entry will
3333
be updated with the flags specified.
3434

35+
Upon successful invocation, the enabled (+) and disabled (-) features
36+
<https://doc.rust-lang.org/cargo/reference/features.md> of the specified
37+
dependency will be listed in the command's output.
38+
3539
OPTIONS
3640
Source options
3741
--git url

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

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ If no source is specified, then a best effort will be made to select one, includ
3131

3232
When you add a package that is already present, the existing entry will be updated with the flags specified.
3333

34+
Upon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified
35+
dependency will be listed in the command's output.
36+
37+
[features]: ../reference/features.md
38+
3439
## OPTIONS
3540

3641
### Source options

‎src/etc/man/cargo-add.1

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ If no source is specified, then a best effort will be made to select one, includ
4343
.RE
4444
.sp
4545
When you add a package that is already present, the existing entry will be updated with the flags specified.
46+
.sp
47+
Upon successful invocation, the enabled (\fB+\fR) and disabled (\fB\-\fR) \fIfeatures\fR <https://doc.rust\-lang.org/cargo/reference/features.md> of the specified
48+
dependency will be listed in the command's output.
4649
.SH "OPTIONS"
4750
.SS "Source options"
4851
.sp

0 commit comments

Comments
 (0)
Please sign in to comment.