Skip to content

Commit 8835604

Browse files
committed
Auto merge of #8737 - ehuss:doc-update-lockfile, r=alexcrichton
Fix minor error in `cargo update` docs. `cargo update` does not require `Cargo.lock` to exist. Also updated `generate-lockfile` to maybe be a little clearer (to me).
2 parents 05c611a + 7c9f45b commit 8835604

File tree

8 files changed

+16
-17
lines changed

8 files changed

+16
-17
lines changed

src/doc/man/cargo-generate-lockfile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cargo-generate-lockfile - Generate the lockfile for a package
1111
## DESCRIPTION
1212

1313
This command will create the `Cargo.lock` lockfile for the current package or
14-
workspace. If the lockfile already exists, it will be rebuilt if there are any
15-
manifest changes or dependency updates.
14+
workspace. If the lockfile already exists, it will be rebuilt with the latest
15+
available version of every package.
1616

1717
See also {{man "cargo-update" 1}} which is also capable of creating a `Cargo.lock`
1818
lockfile and has more options for controlling update behavior.

src/doc/man/cargo-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cargo-update - Update dependencies as recorded in the local lock file
1111
## DESCRIPTION
1212

1313
This command will update dependencies in the `Cargo.lock` file to the latest
14-
version. It requires that the `Cargo.lock` file already exists as generated
15-
by commands such as {{man "cargo-build" 1}} or {{man "cargo-generate-lockfile" 1}}.
14+
version. If the `Cargo.lock` file does not exist, it will be created with the
15+
latest available versions.
1616

1717
## OPTIONS
1818

src/doc/man/generated_txt/cargo-generate-lockfile.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ SYNOPSIS
88

99
DESCRIPTION
1010
This command will create the Cargo.lock lockfile for the current package
11-
or workspace. If the lockfile already exists, it will be rebuilt if
12-
there are any manifest changes or dependency updates.
11+
or workspace. If the lockfile already exists, it will be rebuilt with
12+
the latest available version of every package.
1313

1414
See also cargo-update(1) which is also capable of creating a Cargo.lock
1515
lockfile and has more options for controlling update behavior.

src/doc/man/generated_txt/cargo-update.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ SYNOPSIS
88

99
DESCRIPTION
1010
This command will update dependencies in the Cargo.lock file to the
11-
latest version. It requires that the Cargo.lock file already exists as
12-
generated by commands such as cargo-build(1) or
13-
cargo-generate-lockfile(1).
11+
latest version. If the Cargo.lock file does not exist, it will be
12+
created with the latest available versions.
1413

1514
OPTIONS
1615
Update Options

src/doc/src/commands/cargo-generate-lockfile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cargo-generate-lockfile - Generate the lockfile for a package
1111
## DESCRIPTION
1212

1313
This command will create the `Cargo.lock` lockfile for the current package or
14-
workspace. If the lockfile already exists, it will be rebuilt if there are any
15-
manifest changes or dependency updates.
14+
workspace. If the lockfile already exists, it will be rebuilt with the latest
15+
available version of every package.
1616

1717
See also [cargo-update(1)](cargo-update.md) which is also capable of creating a `Cargo.lock`
1818
lockfile and has more options for controlling update behavior.

src/doc/src/commands/cargo-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cargo-update - Update dependencies as recorded in the local lock file
1111
## DESCRIPTION
1212

1313
This command will update dependencies in the `Cargo.lock` file to the latest
14-
version. It requires that the `Cargo.lock` file already exists as generated
15-
by commands such as [cargo-build(1)](cargo-build.md) or [cargo-generate-lockfile(1)](cargo-generate-lockfile.md).
14+
version. If the `Cargo.lock` file does not exist, it will be created with the
15+
latest available versions.
1616

1717
## OPTIONS
1818

src/etc/man/cargo-generate-lockfile.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ cargo\-generate\-lockfile \- Generate the lockfile for a package
99
\fBcargo generate\-lockfile\fR [\fIoptions\fR]
1010
.SH "DESCRIPTION"
1111
This command will create the \fBCargo.lock\fR lockfile for the current package or
12-
workspace. If the lockfile already exists, it will be rebuilt if there are any
13-
manifest changes or dependency updates.
12+
workspace. If the lockfile already exists, it will be rebuilt with the latest
13+
available version of every package.
1414
.sp
1515
See also \fBcargo\-update\fR(1) which is also capable of creating a \fBCargo.lock\fR
1616
lockfile and has more options for controlling update behavior.

src/etc/man/cargo-update.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ cargo\-update \- Update dependencies as recorded in the local lock file
99
\fBcargo update\fR [\fIoptions\fR]
1010
.SH "DESCRIPTION"
1111
This command will update dependencies in the \fBCargo.lock\fR file to the latest
12-
version. It requires that the \fBCargo.lock\fR file already exists as generated
13-
by commands such as \fBcargo\-build\fR(1) or \fBcargo\-generate\-lockfile\fR(1).
12+
version. If the \fBCargo.lock\fR file does not exist, it will be created with the
13+
latest available versions.
1414
.SH "OPTIONS"
1515
.SS "Update Options"
1616
.sp

0 commit comments

Comments
 (0)