gpt4 book ai didi

rust - 错误 : the `?` operator is not stable error when installing cargo-update

转载 作者:行者123 更新时间:2023-11-29 08:18:56 24 4
gpt4 key购买 nike

我正在尝试更新 cargo:cargo install cargo-update,但我遇到了以下错误:

   Compiling semver-parser v0.7.0
error: the `?` operator is not stable (see issue #31436)
--> /home/netlab/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/src/version.rs:56:26
|
56 | let (pre, pre_len) = common::parse_optional_meta(&s[i..], b'-')?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: the `?` operator is not stable (see issue #31436)
--> /home/netlab/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/src/version.rs:58:30
|
58 | let (build, build_len) = common::parse_optional_meta(&s[i..], b'+')?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: the `?` operator is not stable (see issue #31436)
--> /home/netlab/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/src/range.rs:133:26
|
133 | let (pre, pre_len) = common::parse_optional_meta(&s[i..], b'-')?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

最佳答案

这取决于您的 Rust 版本 — versions of Rust before 1.13您将收到错误消息,因为运算符在这些版本中不稳定。

您的错误消息指的是 a GitHub issue number .

关于rust - 错误 : the `?` operator is not stable error when installing cargo-update,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43086296/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com