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(
285285 . collect ( ) ;
286286 candidates. sort_by_key ( |o| o. 0 ) ;
287287 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( ) ) ;
289289 if !candidates. is_empty ( ) {
290290 // If dependency package name is equal to the name of the candidate here
291291 // it may be a prerelease package which hasn't been specified correctly
@@ -309,8 +309,8 @@ pub(super) fn activation_error(
309309 names. push ( "..." ) ;
310310 }
311311 // 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: " ) ;
314314 msg. push_str ( & names. iter ( ) . enumerate ( ) . fold (
315315 String :: default ( ) ,
316316 |acc, ( i, el) | match i {
Original file line number Diff line number Diff line change @@ -191,9 +191,10 @@ fn simple_install_fail() {
191191error: failed to compile `bar v0.1.0`, intermediate artifacts can be found at `[..]`
192192
193193Caused 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
195197 location searched: registry `https://github.com/rust-lang/crates.io-index`
196- perhaps you meant: bar or foo
197198 required by package `bar v0.1.0`
198199" ,
199200 )
Original file line number Diff line number Diff line change @@ -964,9 +964,10 @@ fn invalid_path_dep_in_workspace_with_lockfile() {
964964 . with_status ( 101 )
965965 . with_stderr (
966966 "\
967- error: no matching package named `bar` found
967+ error: no matching package found
968+ searched package name: `bar`
969+ perhaps you meant: foo
968970location searched: [..]
969- perhaps you meant: foo
970971required by package `foo v0.5.0 ([..])`
971972" ,
972973 )
Original file line number Diff line number Diff line change @@ -155,9 +155,10 @@ fn wrong_case() {
155155 . with_stderr (
156156 "\
157157 [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
159161location searched: registry [..]
160- perhaps you meant: init
161162required by package `foo v0.0.1 ([..])`
162163" ,
163164 )
@@ -190,9 +191,10 @@ fn mis_hyphenated() {
190191 . with_stderr (
191192 "\
192193 [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
194197location searched: registry [..]
195- perhaps you meant: mis-hyphenated
196198required by package `foo v0.0.1 ([..])`
197199" ,
198200 )
@@ -1439,9 +1441,9 @@ fn use_semver_package_incorrectly() {
14391441 . with_stderr (
14401442 "\
14411443 error: no matching package named `a` found
1442- location searched: [..]
14431444prerelease package needs to be specified explicitly
14441445a = { version = \" 0.1.1-alpha.0\" }
1446+ location searched: [..]
14451447required by package `b v0.1.0 ([..])`
14461448" ,
14471449 )
You can’t perform that action at this time.
0 commit comments