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 failaure when compiling time crate with Rust 1.80.0 #58

Open
yfaming opened this issue Aug 17, 2024 · 1 comment · May be fixed by #59
Open

Build failaure when compiling time crate with Rust 1.80.0 #58

yfaming opened this issue Aug 17, 2024 · 1 comment · May be fixed by #59

Comments

@yfaming
Copy link

yfaming commented Aug 17, 2024

Here is my Rust version info.

# cargo --version
cargo 1.80.0 (376290515 2024-07-16)

# rustc --version
rustc 1.80.0 (051478957 2024-07-21)

And the compilation error is below:

error[E0282]: type annotations needed for `Box<_>`
  --> /Users/yfaming/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/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
   |              ++++++++

After some googling, I think the solution is upgrading time to 0.3.36. Here is an PR in rustlang/rust doing the same upgrade, rust-lang/rust#124736 . And it described the root cause.

But since time crate is just one of the indirect dependencies of this repo, I'd suggest add time = 0.3.36 to searcher_client/Cargo.toml to pin the version.

@yfaming yfaming linked a pull request Aug 17, 2024 that will close this issue
@pluviocapital
Copy link

cargo update -p time

Run this and it should fix it. I had the same issue

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.

2 participants