首页 > 解决方案 > 基板节点模板构建错误 E0277

问题描述

我按照本教程进行操作。
https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup
当我运行cargo build --release然后得到错误:

error[E0277]: `[parity_wasm::elements::Instruction; 15]` is not an iterator
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/pwasm-utils-0.18.2/src/stack_height/mod.rs:300:23
    |
300 |                 new_instrs.extend(new_seq);
    |                                   ^^^^^^^
    |                                   |
    |                                   expected an implementor of trait `IntoIterator`
    |                                   help: consider borrowing here: `&new_seq`
    |
    = note: the trait bound `[parity_wasm::elements::Instruction; 15]: IntoIterator` is not satisfied
    = note: required because of the requirements on the impl of `IntoIterator` for `[parity_wasm::elements::Instruction; 15]`

   Compiling unsigned-varint v0.7.0

我用的是 Ubuntu & cargo 版本 1.51.0
谢谢

标签: substrate

解决方案


似乎您的 rust nightly 工具链与上面编写的代码不兼容。您需要使用 nightly-2020-10-01 或某些不同版本的 nightly 工具链来降级它rustup install nightly-2020-10-01


推荐阅读