File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ pub(super) fn activation_error(
285
285
. collect ( ) ;
286
286
candidates. sort_by_key ( |o| o. 0 ) ;
287
287
let mut msg = format ! (
288
- "no matching package named `{}` found \n " , dep. package_name( ) ) ;
288
+ "no matching package found \n searched package name: `{}`\n " , dep. package_name( ) ) ;
289
289
if !candidates. is_empty ( ) {
290
290
// If dependency package name is equal to the name of the candidate here
291
291
// it may be a prerelease package which hasn't been specified correctly
@@ -309,8 +309,8 @@ pub(super) fn activation_error(
309
309
names. push ( "..." ) ;
310
310
}
311
311
// Vertically align first suggestion with missing crate name
312
- // so the silly typo you probably made jumps out at you.
313
- msg. push_str ( "perhaps you meant: " ) ;
312
+ // so a typo jumps out at you.
313
+ msg. push_str ( "perhaps you meant: " ) ;
314
314
msg. push_str ( & names. iter ( ) . enumerate ( ) . fold (
315
315
String :: default ( ) ,
316
316
|acc, ( i, el) | match i {
Original file line number Diff line number Diff line change @@ -191,9 +191,10 @@ fn simple_install_fail() {
191
191
error: failed to compile `bar v0.1.0`, intermediate artifacts can be found at `[..]`
192
192
193
193
Caused by:
194
- no matching package named `baz` found
194
+ no matching package found
195
+ searched package name: `baz`
196
+ perhaps you meant: bar or foo
195
197
location searched: registry `https://github.com/rust-lang/crates.io-index`
196
- perhaps you meant: bar or foo
197
198
required by package `bar v0.1.0`
198
199
" ,
199
200
)
Original file line number Diff line number Diff line change @@ -964,9 +964,10 @@ fn invalid_path_dep_in_workspace_with_lockfile() {
964
964
. with_status ( 101 )
965
965
. with_stderr (
966
966
"\
967
- error: no matching package named `bar` found
967
+ error: no matching package found
968
+ searched package name: `bar`
969
+ perhaps you meant: foo
968
970
location searched: [..]
969
- perhaps you meant: foo
970
971
required by package `foo v0.5.0 ([..])`
971
972
" ,
972
973
)
Original file line number Diff line number Diff line change @@ -155,9 +155,10 @@ fn wrong_case() {
155
155
. with_stderr (
156
156
"\
157
157
[UPDATING] [..] index
158
- error: no matching package named `Init` found
158
+ error: no matching package found
159
+ searched package name: `Init`
160
+ perhaps you meant: init
159
161
location searched: registry [..]
160
- perhaps you meant: init
161
162
required by package `foo v0.0.1 ([..])`
162
163
" ,
163
164
)
@@ -190,9 +191,10 @@ fn mis_hyphenated() {
190
191
. with_stderr (
191
192
"\
192
193
[UPDATING] [..] index
193
- error: no matching package named `mis_hyphenated` found
194
+ error: no matching package found
195
+ searched package name: `mis_hyphenated`
196
+ perhaps you meant: mis-hyphenated
194
197
location searched: registry [..]
195
- perhaps you meant: mis-hyphenated
196
198
required by package `foo v0.0.1 ([..])`
197
199
" ,
198
200
)
@@ -1439,9 +1441,9 @@ fn use_semver_package_incorrectly() {
1439
1441
. with_stderr (
1440
1442
"\
1441
1443
error: no matching package named `a` found
1442
- location searched: [..]
1443
1444
prerelease package needs to be specified explicitly
1444
1445
a = { version = \" 0.1.1-alpha.0\" }
1446
+ location searched: [..]
1445
1447
required by package `b v0.1.0 ([..])`
1446
1448
" ,
1447
1449
)
You can’t perform that action at this time.
0 commit comments