mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Suggest cargo add when installing library crate
This commit is contained in:
parent
ba607b23db
commit
98edd706ad
@ -209,8 +209,8 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> {
|
||||
bail!(
|
||||
"there is nothing to install in `{}`, because it has no binaries\n\
|
||||
`cargo install` is only for installing programs, and can't be used with libraries.\n\
|
||||
To use a library crate, add it as a dependency in a Cargo project instead.",
|
||||
pkg
|
||||
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
|
||||
pkg,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -730,7 +730,7 @@ fn no_binaries() {
|
||||
"\
|
||||
[ERROR] there is nothing to install in `foo v0.0.1 ([..])`, because it has no binaries[..]
|
||||
[..]
|
||||
[..]",
|
||||
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user