Commit 0e07a15
authored
### What does this PR try to resolve?
The `--breaking` option in `cargo update` is documented as taking a
`directory` argument:
--breaking directory
Update spec to latest SemVer-breaking version.
This is incorrect — `--breaking` is a plain boolean flag with no
argument. It's defined via the `flag(...)` helper in
`src/bin/cargo/commands/update.rs` and checked with
`args.flag("breaking")`, the same pattern used by
`--recursive`/`--dry-run`, which correctly show no metavar. Running
`cargo update --help` confirms this:
-b, --breaking Update [SPEC] to latest SemVer-breaking version
(unstable)
The stray `_directory_` appears to be a copy-paste artifact from other
flags that legitimately take a directory value (e.g. `--artifact-dir`,
`--target-dir`), most likely introduced when `--breaking` was added in
#13979.
This PR removes the incorrect metavar from the doc/man source
(`doc/man/cargo-update.md`) and regenerates the derived outputs
(`doc/man/generated_txt/cargo-update.txt`, `etc/man/cargo-update.1`,
`doc/book/src/commands/cargo-update.md`) via `cargo build-man`, per the
[documentation contributor
guide](https://rust-lang.github.io/cargo/contrib/documentation/index.html#building-the-man-pages).
### How to test and review this PR?
Compare the rendered `--breaking` entry before/after in
`doc/man/generated_txt/cargo-update.txt` or
`doc/book/src/commands/cargo-update.md` — it should no longer show
`directory` after `--breaking`. This is a docs-only change; no behavior
is affected.
Fixes #17318
4 files changed
Lines changed: 4 additions & 4 deletions
File tree
- doc
- book/src/commands
- man
- generated_txt
- etc/man
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments