Skip to content

Commit

Permalink
Document cargo-add's feature message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
buggymcbugfix committed Aug 30, 2022
1 parent 4ed54ce commit 9c8a8ea
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doc/man/cargo-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/doc/man/generated_txt/cargo-add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://doc.rust-lang.org/cargo/reference/features.md> of the specified
dependency will be listed in the command's output.

OPTIONS
Source options
--git url
Expand Down
5 changes: 5 additions & 0 deletions src/doc/src/commands/cargo-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/etc/man/cargo-add.1
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://doc.rust\-lang.org/cargo/reference/features.md> of the specified
dependency will be listed in the command's output.
.SH "OPTIONS"
.SS "Source options"
.sp
Expand Down

0 comments on commit 9c8a8ea

Please sign in to comment.