Issues with time v0.3.30 and latest rustc
ShutdownRepo opened this issue · 1 comments
ShutdownRepo commented
Issue
When running cargo build --release
Compiling time v0.3.30
Compiling num-bigint v0.4.4
Compiling percent-encoding v2.3.1
Compiling async-trait v0.1.74
error[E0282]: type annotations needed for `Box<_>`
--> /root/.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
| ++++++++
Compiling form_urlencoded v1.2.1
Compiling idna v0.5.0
Compiling rand_core v0.6.4
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Temporary fix
As seen in https://users.rust-lang.org/t/time-crate-compilation-error/111789/4
cargo update -p time
then
cargo build --release
Fix
Probably update the time
package in Cargo.lock
Below is the diff produced by the temp fix
diff --git a/Cargo.lock b/Cargo.lock
index 52956e1..882ff2c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
+++ b/Cargo.lock
@@ -984,6 +984,12 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-integer"
version = "0.1.45"
@@ -1624,12 +1630,13 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.30"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "zip"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
dependencies = [
"byteorder",
"crc32fast",
System
stable-aarch64-unknown-linux-gnu
rustc 1.80.0 (051478957 2024-07-21)
ShutdownRepo commented
This also applies to the v2
branch