Skip to content

Commit

Permalink
Auto merge of #11033 - buggymcbugfix:buggymcbugfix/cargo-add-docs, r=…
Browse files Browse the repository at this point in the history
…epage

Very slight `cargo add` documentation improvements

As discussed in rust-lang/book#3331, a quick explanation of the `Features` part of the message that gets printed to stdout when adding some dependency.

Consider the following example:

```
cargo add my-crate
    Updating crates.io index
      Adding my-crate v0.1.0 to dependencies.
             Features:
             + foo
             - bar
```

It was not clear to me what `+foo` and `-bar` meant until `@carols10cents'` kindly explained it to me. Hopefully the documentation now clarifies this.

TODO:

- [x] Run `./build-man.sh`
  • Loading branch information
bors committed Aug 30, 2022
2 parents 996a636 + 9c8a8ea commit f75aee0
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 f75aee0

Please sign in to comment.