问题描述
当我按照 https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup 中的步骤构建基板时,出现编译问题:
error[E0658]: `match` is not allowed in a `const fn`
--> /Users/adiosxia/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:156:12
|
156 | [][match result {
| ____________^
157 | | Ok(alphabet) => return alphabet,158 | | Err(_) => 0,159 | | }]
| |_________^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
在编译 bs58 时。我尝试重置锈环境,但它不起作用。如何解决?
解决方法
我能够毫无问题地按照您参考的教程进行操作,我想说这与您的 Rust 版本有关。
1.49.0
工作正常。
此外,我默认运行此工具链 nightly-2020-10-06-x86_64-unknown-linux-gnu