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

Build fails with rust 1.80 #259

Closed
GaetanLepage opened this issue Aug 25, 2024 · 3 comments · Fixed by #262
Closed

Build fails with rust 1.80 #259

GaetanLepage opened this issue Aug 25, 2024 · 3 comments · Fixed by #262

Comments

@GaetanLepage
Copy link

When trying to build the plugin with rust >= 1.80, I get:

error[E0282]: type annotations needed for `Box<_>`
  --> /home/gaetan/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

This should be fixed by a simple dependency bump (see NixOS/nixpkgs#332957).
However, running cargo update leads to a new error:

error[E0283]: type annotations needed
   --> /home/gaetan/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-url-0.22.0/src/lib.rs:106:54
    |
106 |             let path = gix_path::from_bstr(self.path.as_ref());
    |                                                      ^^^^^^
    |
    = 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
    |
106 |             let path = gix_path::from_bstr(<BString as AsRef<T>>::as_ref(&self.path));
    |                                            +++++++++++++++++++++++++++++++         ~

error[E0283]: type annotations needed
   --> /home/gaetan/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-url-0.22.0/src/lib.rs:106:24
    |
106 |             let path = gix_path::from_bstr(self.path.as_ref());
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/gaetan/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-path-0.9.0/src/convert.rs:126:34
    |
126 | pub fn from_bstr<'a>(input: impl Into<Cow<'a, BStr>>) -> Cow<'a, Path> {
    |                                  ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_bstr`

For more information about this error, try `rustc --explain E0283`.
error: could not compile `gix-url` (lib) due to 2 previous errors
@supermarin
Copy link
Contributor

supermarin commented Sep 16, 2024

I fixed it in #262 but not sure if this is actively maintained anymore.
@burmudar @jdorfman any chance we can have some 👀 on this?

@burmudar
Copy link
Contributor

I fixed it in #262 but not sure if this is actively maintained anymore. @burmudar @jdorfman any chance we can have some 👀 on this?

Awesome! The workflow needed an approval to run so just kicked that off!

@burmudar
Copy link
Contributor

Thanks for reporting @GaetanLepage and thanks for fixing it @supermarin. I've merged it now 🥳

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

Successfully merging a pull request may close this issue.

3 participants