错误:使用 cargo 编译时无法编译 `time`
Posted
技术标签:
【中文标题】错误:使用 cargo 编译时无法编译 `time`【英文标题】:error: could not compile `time` when using cargo to compile 【发布时间】:2022-01-20 21:21:35 【问题描述】:今天当我在 Fedora 32 中使用我的项目运行 cargo build
时,显示如下编译错误:
Compiling devise v0.3.1
thread 'rustc' panicked at 'assertion failed: sentinel == STR_SENTINEL', /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/compiler/rustc_serialize/src/opaque.rs:669:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (0b42deacc 2021-12-09) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
Compiling async-stream v0.3.2
error: could not compile `time`
warning: build failed, waiting for other jobs to finish...
error: build failed
我的货物版本是:
[dolphin@MiWiFi-R4CM-srv]~/Documents/GitHub/rust_wheel% cargo version
cargo 1.58.0-nightly (40dc28175 2021-12-06)
有人遇到同样的问题吗?任何修复建议?我从谷歌搜索似乎没有人面临同样的问题。
【问题讨论】:
【参考方案1】:this issue 似乎跟踪了这个内部编译器错误:
尝试清理您的构建工件:
cargo clean
,在大多数情况下,重建后崩溃应该会消失。应该用每晚
2021-12-11
修复
【讨论】:
它有效。谢谢!@kmdreko以上是关于错误:使用 cargo 编译时无法编译 `time`的主要内容,如果未能解决你的问题,请参考以下文章