Skip to content

Commit 4ac43be

Browse files
committed
Auto merge of #12685 - eopb:ambiguous-spec-12433, r=epage
generalise suggestion on abiguous spec Fixes #12433
2 parents 30ce446 + 9831e83 commit 4ac43be

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/cargo/core/package_id_spec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ impl PackageIdSpec {
250250
your project, and the specification \
251251
`{}` is ambiguous.\n\
252252
Please re-run this command \
253-
with `-p <spec>` where `<spec>` is one \
254-
of the following:",
253+
with one of the following \
254+
specifications:",
255255
self.name(),
256256
self
257257
);

tests/testsuite/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,8 +1887,8 @@ fn update_ambiguous() {
18871887
"\
18881888
[ERROR] There are multiple `bar` packages in your project, and the specification `bar` \
18891889
is ambiguous.
1890-
Please re-run this command with `-p <spec>` where `<spec>` is one of the \
1891-
following:
1890+
Please re-run this command with one of the \
1891+
following specifications:
18921892
bar@0.[..].0
18931893
bar@0.[..].0
18941894
",

tests/testsuite/pkgid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ fn multiple_versions() {
152152
.with_stderr(
153153
"\
154154
error: There are multiple `two-ver` packages in your project, and the specification `two-ver@0` is ambiguous.
155-
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
155+
Please re-run this command with one of the following specifications:
156156
two-ver@0.1.0
157157
two-ver@0.2.0
158158
",
@@ -174,7 +174,7 @@ https://github.com/rust-lang/crates.io-index#two-ver@0.2.0
174174
.with_stderr(
175175
"\
176176
error: There are multiple `two-ver` packages in your project, and the specification `two-ver` is ambiguous.
177-
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
177+
Please re-run this command with one of the following specifications:
178178
two-ver@0.1.0
179179
two-ver@0.2.0
180180
",

tests/testsuite/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ fn ambiguous_name() {
16751675
.with_stderr_contains(
16761676
"\
16771677
error: There are multiple `dep` packages in your project, and the specification `dep` is ambiguous.
1678-
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
1678+
Please re-run this command with one of the following specifications:
16791679
dep@1.0.0
16801680
dep@2.0.0
16811681
",

0 commit comments

Comments
 (0)