error[E0282]: type annotations needed for `Box<_>`

问题

2024-09-10T09:40:18.716540Z ERROR FetchBuildDataError: warning: both /Users//.cargo/config and /Users/l/.cargo/config.toml exist. Using /Users/username/.cargo/config
warning: both /Users/lu/.cargo/config and /Users//.cargo/config.toml exist. Using /Users/l/.cargo/config
error[E0282]: type annotations needed for Box<_>
--> /Users/lu/.cargo/registry/src/rsproxy.cn-0dccff568467c15b/time-0.3.26/src/format_description/parse/mod.rs:83:9
|
83 | let items = format_items
| ^^^^^
...
86 | Ok(items.into())
| ---- type must be known at this point
|
= note: this is an inference error on crate time caused by an API change in Rust 1.80.0; update time to version >=0.3.35 by calling cargo update

error: aborting due to 1 previous error

For more information about this error, try rustc --explain E0282.

error: could not compile time (lib) due to 2 previous errors

原因

写在保存信息中,是 rust 1.80.0 更新的一个break change

解决方法

cargo update
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容