当我尝试从这里构建乒乓智能契约时,我使用:
erdpy build contract我没有得到以下预期输出:
INFO:projects.core:WASM file generated: output/ping-pong.wasm由于sc_results.rs文件中出现以下错误:
Compiling elrond-codec v0.5.3
Compiling elrond-wasm v0.18.2
error[E0432]: unresolved import `core::ops::FromResidual`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:7:30
...
error[E0437]: type Output is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:62:5
...
error[E0437]: type Residual is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:63:5
...
error[E0407]: method branch is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:65:5
...
error[E0407]: method from_output is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:71:5
...
error aborting due to 5 previous errors
...
CRITICAL:cli:Build error: error code = 101, see output.环境:
如何解决这个构建问题?
发布于 2021-10-13 22:34:36
问题是,今年早些时候,Rust发生了一个不向后兼容的变化。因此,与旧版本有不兼容之处,但对于较新版本来说,效果很好。
使用以下方法更新锈蚀:
rustup update解决了问题。
现在:
rustc --version | grep -o '^[^(]*'版画
rustc 1.57.0-nightlyhttps://stackoverflow.com/questions/69562654
复制相似问题