Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitoxide fails to compile with bstr 1.9.2 #1467

Closed
epage opened this issue Jul 25, 2024 · 1 comment
Closed

gitoxide fails to compile with bstr 1.9.2 #1467

epage opened this issue Jul 25, 2024 · 1 comment

Comments

@epage
Copy link
Contributor

epage commented Jul 25, 2024

Current behavior 😯

$ cargo check
    Checking gix-date v0.8.6
    Checking gix-credentials v0.24.2
error[E0283]: type annotations needed
  --> /home/epage/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.24.2/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/epage/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.24.2/src/program/mod.rs:83:3
8
    |
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/epage/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-path-0.10.7/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`

    Checking gix-actor v0.31.2
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...

Expected behavior 🤔

Builds

Git behavior

N/A

Steps to reproduce 🕹

$ cd cargo
$ cargo update bstr --precise 1.9.2
@epage
Copy link
Contributor Author

epage commented Jul 25, 2024

Closing in favor of #1466

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
@Skgland Skgland mentioned this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant