-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
At the present, attempting to install crev with cargo install cargo-crev will fail, with the following error (in a dependency).
error message (only included for completeness)
error[E0283]: type annotations needed
--> /home/neko/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.22.0/src/program/mod.rs:83:63
|
83 | gix_command::prepare(gix_path::from_bstr(args.as_ref()).into_owned())
| ^^^^^^
|
= note: multiple `impl`s satisfying `BString: AsRef<_>` found in the `bstr` crate:
- impl AsRef<BStr> for BString;
- impl AsRef<[u8]> for BString;
help: try using a fully qualified path to specify the expected types
|
83 | gix_command::prepare(gix_path::from_bstr(<BString as AsRef<T>>::as_ref(&args)).into_owned())
| +++++++++++++++++++++++++++++++ ~
error[E0283]: type annotations needed
--> /home/neko/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.22.0/src/program/mod.rs:83:38
|
83 | gix_command::prepare(gix_path::from_bstr(args.as_ref()).into_owned())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for reference `&_`
|
= note: multiple `impl`s satisfying `Cow<'_, BStr>: From<&_>` found in the `bstr` crate:
- impl<'a> From<&'a BStr> for Cow<'a, BStr>;
- impl<'a> From<&'a BString> for Cow<'a, BStr>;
= note: required for `&_` to implement `Into<Cow<'_, BStr>>`
note: required by a bound in `from_bstr`
--> /home/neko/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-path-0.10.10/src/convert.rs:135:34
|
135 | pub fn from_bstr<'a>(input: impl Into<Cow<'a, BStr>>) -> Cow<'a, Path> {
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_bstr`
Compiling toml_datetime v0.6.8
For more information about this error, try `rustc --explain E0283`.
error: could not compile `gix-credentials` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
However, this is easily resolved by using cargo install --locked cargo-crev. Neither install or build instructions mention --locked, and it may not be obvious to users that it exists. So, the request is to either recommend it as the default in getting started, or mention it as an option in the case of compilation errors (depending on how desirable or undesirable getting the newest version of dependencies is).
anna-hope
Metadata
Metadata
Assignees
Labels
No labels