【发布时间】:2021-07-05 12:12:04
【问题描述】:
我尝试通过命令cargo +nightly build --release -Z unstable-options 构建rls,但出现以下错误:
error[E0599]: no method named `expect_none` found for enum `Option<Fingerprint>` in the current scope
--> /Users/cjw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-705.0.0/src/lib.rs:2003:48
|
2003 | cache[index].replace(sub_hash).expect_none("Cache slot was filled");
| ^^^^^^^^^^^ method not found in `Option<Fingerprint>`
搜索后发现expect_none是夜间功能,貌似已经被删除了。
所以我想也许我应该更改 rust 编译器版本来修复编译问题。如果这是正确的解决方案,我该怎么做?谁能提供一些详细的建议?
【问题讨论】:
标签: rust build rust-cargo rls