Skip to content

Commit 048d0d7

Browse files
authored
fix: Remove default registry reference in info cmd docs (#14880)
### What does this PR try to resolve? close #14810 Remove the registry description to reduce confusion, as the `spec` already explains local `Cargo.toml` inspection behavior. ### How should we test and review this PR? The unit test has been updated. ### Additional information r? @epage
2 parents 0d730ac + a44ada0 commit 048d0d7

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

src/bin/cargo/commands/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use cargo_util_schemas::core::PackageIdSpec;
55

66
pub fn cli() -> Command {
77
Command::new("info")
8-
.about("Display information about a package in the registry")
8+
.about("Display information about a package")
99
.arg(
1010
Arg::new("package")
1111
.required(true)

src/doc/man/cargo-info.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## NAME
44

5-
cargo-info --- Display information about a package in the registry. Default registry is crates.io
5+
cargo-info --- Display information about a package.
66

77
## SYNOPSIS
88

99
`cargo info` [_options_] _spec_
1010

1111
## DESCRIPTION
1212

13-
This command displays information about a package in the registry. It fetches data from the package's Cargo.toml file
13+
This command displays information about a package. It fetches data from the package's Cargo.toml file
1414
and presents it in a human-readable format.
1515

1616
## OPTIONS
@@ -60,7 +60,7 @@ selected based on the Minimum Supported Rust Version (MSRV).
6060
cargo info [email protected]
6161
3. Inspect the `serde` package form the local registry:
6262

63-
cargo info serde --registry my-registry
63+
cargo info serde --registry my-registry
6464

6565
## SEE ALSO
6666

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
CARGO-INFO(1)
22

33
NAME
4-
cargo-info — Display information about a package in the registry.
5-
Default registry is crates.io
4+
cargo-info — Display information about a package.
65

76
SYNOPSIS
87
cargo info [options] spec
98

109
DESCRIPTION
11-
This command displays information about a package in the registry. It
12-
fetches data from the package’s Cargo.toml file and presents it in a
13-
human-readable format.
10+
This command displays information about a package. It fetches data from
11+
the package’s Cargo.toml file and presents it in a human-readable
12+
format.
1413

1514
OPTIONS
1615
Info Options
@@ -149,7 +148,7 @@ EXAMPLES
149148

150149
3. Inspect the serde package form the local registry:
151150

152-
cargo info serde --registry my-registry
151+
cargo info serde --registry my-registry
153152

154153
SEE ALSO
155154
cargo(1), cargo-search(1)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## NAME
44

5-
cargo-info --- Display information about a package in the registry. Default registry is crates.io
5+
cargo-info --- Display information about a package.
66

77
## SYNOPSIS
88

99
`cargo info` [_options_] _spec_
1010

1111
## DESCRIPTION
1212

13-
This command displays information about a package in the registry. It fetches data from the package's Cargo.toml file
13+
This command displays information about a package. It fetches data from the package's Cargo.toml file
1414
and presents it in a human-readable format.
1515

1616
## OPTIONS
@@ -161,7 +161,7 @@ details on environment variables that Cargo reads.
161161
cargo info [email protected]
162162
3. Inspect the `serde` package form the local registry:
163163

164-
cargo info serde --registry my-registry
164+
cargo info serde --registry my-registry
165165

166166
## SEE ALSO
167167

src/etc/man/cargo-info.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
.ad l
55
.ss \n[.ss] 0
66
.SH "NAME"
7-
cargo\-info \[em] Display information about a package in the registry. Default registry is crates.io
7+
cargo\-info \[em] Display information about a package.
88
.SH "SYNOPSIS"
99
\fBcargo info\fR [\fIoptions\fR] \fIspec\fR
1010
.SH "DESCRIPTION"
11-
This command displays information about a package in the registry. It fetches data from the package\[cq]s Cargo.toml file
11+
This command displays information about a package. It fetches data from the package\[cq]s Cargo.toml file
1212
and presents it in a human\-readable format.
1313
.SH "OPTIONS"
1414
.SS "Info Options"
@@ -193,7 +193,7 @@ details on environment variables that Cargo reads.
193193
.sp
194194
.RS 4
195195
.nf
196-
cargo info serde \-\-registry my\-registry
196+
cargo info serde \-\-registry my\-registry
197197
.fi
198198
.RE
199199
.RE

tests/testsuite/cargo_info/help/stdout.term.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)