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

Error with rust-nightly: type annotations needed for Box<_> #681

Closed
dessalines opened this issue May 20, 2024 · 7 comments · Fixed by openmls/openmls#1648 or chipsalliance/caliptra-dpe#362
Labels
C-invalid Category: no issue exists or the issue cannot be reproduced

Comments

@dessalines
Copy link

Error:

/home/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
let items = format_items
consider giving `items` an explicit type, where the placeholders `_` are specified
let items: Box<_> = format_items

I'll have a PR shortly, hopefully clippy's suggestion will fix.

@dessalines
Copy link
Author

Nevermind, I see that this has been fixed, deps just need to be updated.

@JosiahParry
Copy link

JosiahParry commented May 23, 2024

@dessalines, I am running into this issue at present with both nightly and 1.78 docker images. How did you address it?

Edit: even thought time is only a recursive dependency, adding it to my Cargo.toml fixed this issue.

time = "0.3.36"

@dessalines
Copy link
Author

For me it was as simple as running cargo update. Make sure you open issues if there's a crate you're using that hasn't updated.

mikayla-maki pushed a commit to zed-industries/zed that referenced this issue May 26, 2024
run `cargo update --package time` due to
time-rs/time#681

Release Notes:

- N/A
kaffarell added a commit to kaffarell/tracing that referenced this issue May 31, 2024
Bumped the time crate to latest, they fixed some rust-nightly lint
errors (time-rs/time#681).
kaffarell added a commit to kaffarell/tracing that referenced this issue May 31, 2024
Bumped the time crate to latest, they fixed some rust-nightly lint
errors (time-rs/time#681).

Fixes: tokio-rs#2977
kaffarell added a commit to kaffarell/tracing that referenced this issue May 31, 2024
Bumped the time crate to latest, they fixed some rust-nightly lint
errors (time-rs/time#681).

Fixes: tokio-rs#2977
@mladedav
Copy link

mladedav commented May 31, 2024

If I understand it correctly, the code used to compile but doesn't with newer versions of the compiler? How is this not an issue in rustc? Something changed that broke backwards compatibility and that should not happen, right?

@jhpratt
Copy link
Member

jhpratt commented May 31, 2024

I haven't looked into this at all, but my understanding from discussions elsewhere is that this was fixed by #671. time was caught in a crater run when a new trait implementation was added to the standard library. While it is a breaking change, it is considered acceptable breakage because the alternative is never adding any trait implementations or methods.

chris13524 added a commit to WalletConnect/verify-server that referenced this issue Jun 25, 2024
mvidner added a commit to agama-project/agama that referenced this issue Jul 29, 2024
for compatibility with newer rust compilers
time-rs/time#681
@jhpratt jhpratt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
omertuc added a commit to omertuc/recert-1 that referenced this issue Aug 1, 2024
# Background

Recert uses the `simple_asn1` crate in order to calculate the SKID on
RSA keys

# Problem

The `simple_asn1` crate depends on the `time` crate, which recently
encountered a regression [1] due to [2] that caused the `simple_asn1`
crate to fail to compile with our locked version (0.3.30) of the `time`
crate.

# Solution

Updated the `time` crate to version 0.3.36, which contains a fix for the
regression. Re-ran vendoring.

[1] time-rs/time#681
[2] rust-lang/rust#125319
YuevUwU added a commit to YuevUwU/phira-docs that referenced this issue Aug 1, 2024
Just make sure mdbook-i18n-helpers >= 0.3.3 to avoid error[E0282]: type annotations needed for `Box<_>`

See Also: 
- time-rs/time#681
- google/mdbook-i18n-helpers#198
@jhpratt jhpratt pinned this issue Aug 1, 2024
eternal-flame-AD added a commit to eternal-flame-AD/faster-gtfsort that referenced this issue Aug 2, 2024
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
@iitalics
Copy link

iitalics commented Aug 8, 2024

would it be possible to backport a fix for this?

@jhpratt
Copy link
Member

jhpratt commented Aug 8, 2024

@iitalics That's impossible.

@time-rs time-rs locked as resolved and limited conversation to collaborators Aug 8, 2024
clundin25 added a commit to clundin25/caliptra-dpe that referenced this issue Oct 16, 2024
Resolves: chipsalliance#361.

Update fuzzer lock file to resolve: time-rs/time#681
clundin25 added a commit to clundin25/caliptra-dpe that referenced this issue Oct 16, 2024
Resolves: chipsalliance#361.

Update fuzzer lock file to resolve: time-rs/time#681
clundin25 added a commit to clundin25/caliptra-dpe that referenced this issue Oct 16, 2024
Resolves: chipsalliance#361.

Update fuzzer lock file to resolve: time-rs/time#681
jhand2 pushed a commit to chipsalliance/caliptra-dpe that referenced this issue Oct 16, 2024
Resolves: #361.

Update fuzzer lock file to resolve: time-rs/time#681
@jhpratt jhpratt unpinned this issue Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-invalid Category: no issue exists or the issue cannot be reproduced
Projects
None yet
5 participants