substrate - 基板节点模板构建错误 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
谢谢
解决方案
似乎您的 rust nightly 工具链与上面编写的代码不兼容。您需要使用 nightly-2020-10-01 或某些不同版本的 nightly 工具链来降级它rustup install nightly-2020-10-01
推荐阅读
- javascript - 如何使用 reactjs 中的地图功能在 UI 中显示数据?
- javascript - 如何在 JS 中的对象内创建一个数组?
- ionic-framework - 离子路由器失败
- java - 使用最佳性能方法在两个数组中查找公共元素
- google-cloud-platform - Google Cloud Monitoring 写入数据点的速度比最大采样周期快
- arrays - 需要帮助了解二进制搜索如何在前缀和数组上工作
- python - 以视觉/图形方式表示 Graph 数据结构
- c# - 无法在简单查询中翻译 LINQ 表达式
- ruby-on-rails - RAILS 5:ActionController::ParameterMissing - 无法让 RSPEC 通过
- javascript - jQuery 3D透视图