time-rs / time

The most used Rust library for date and time handling.
https://time-rs.github.io
Apache License 2.0
1.06k stars 261 forks source link

compile error: time-0.3.29/src/format_description/parse/mod.rs:83:9 "type must be known at this point" #685

Closed phial3 closed 1 month ago

phial3 commented 1 month ago
error[E0282]: type annotations needed for `Box<_>`
  --> /Users/admin/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/time-0.3.29/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 slab v0.4.9
   Compiling ppv-lite86 v0.2.17
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error

what should i do?

jhpratt commented 1 month ago

See #681. Running cargo update should suffice.