From 6ef9e013f409552e1726ffc33e2281e83cacc334 Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Sat, 24 Aug 2024 17:27:08 +0100 Subject: [PATCH] Update `time` to fix build failures on rust `1.80.0` (#134) Rust `1.80.0` introduced a [new trait implementation](https://github.com/rust-lang/rust/pull/99969) which caused builds of [old versions of the `time` crate to fail](https://github.com/rust-lang/rust/issues/127343). Since `cargo clone` depends on one of these old `time` versions, builds with rust `1.80.0` or later fail: ``` error[E0282]: type annotations needed for `Box<_>` --> /home/ethan/.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 | ++++++++ For more information about this error, try `rustc --explain E0282`. error: could not compile `time` (lib) due to 1 previous error ``` Updating to a version of time with this regression fixed, with `cargo update -p time`, fixes the build of `cargo clone`. It would also be helpful to get a new release of `cargo clone` after this is merged, since this is also causing the `cargo clone` package to [fail on NixOS](https://github.com/NixOS/nixpkgs/issues/332957#issuecomment-2278578158). --- Cargo.lock | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 950fb31..fec5d53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1982,6 +1982,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" version = "0.2.17" @@ -2760,13 +2766,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -2782,10 +2789,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ]