问题描述
我正在学习[实现合同特征]教程。在[parameter_types!]和[imp trait runtime]中添加了代码片段。
当我运行[cargo check -p node-template-runtime]时收到错误:
错误[E0282]:需要输入注释
错误:无法编译sp-arithmetic
注意:此错误源于一个宏(在每晚构建中,请使用-Z macro-backtrace来获取更多信息)
我以前有这个错误,是因为每晚?
我正在使用Windows,而不是mac ..
解决方法
我遇到了完全相同的错误,但是我只是检出了master(从https://github.com/substrate-developer-hub/substrate-node-template/commit/5769470053ba48f364100ff106e32f1beea43127开始有一个工具链文件) 晚上2020年10月6日,构建成功。 祝你好运
,只需添加到@dundro答案。转到他建议的链接:
并下载“ rust-toolchain”文件。然后将其放在“基板节点模板”文件夹中。然后尝试使用命令“ cargo build --release”再次构建。
就我而言,它解决了E0282错误,并给了我一个新的E0463。立即搜索修复程序
,已解决:我忘了每晚添加[cargo + nightly-2020-10-06 check -p node-template-runtime]。