获取`错误:由于以前的错误而无法编译``libp2p-noise'
我一直在尝试编译一个替代项目,但会遇到这个奇怪的错误。
error[E0282]: type annotations needed
--> /Users/ayushkumarmishra/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45
|
221 | curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
| -----^^^^^^--
| | |
| | cannot infer type for type parameter `T` declared on the trait `AsRef`
| this method call resolves to `&T`
|
= note: type must be known at this point
For more information about this error, try `rustc --explain E0282`.
error: could not compile `libp2p-noise` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
有人可以帮我解决这个问题吗?
的输出
以下是Rustup Show
安装工具链
稳定-Aarch64-Apple-darwin 夜间2021-08-31-AARCH64-APPLE-DARWIN Nightly-2021-11-07-Aarch64-Apple-darwin(默认)
的目标
安装了主动工具链AARCH64-APPLE-DARWIN WASM32未知的
主动工具链
每晚2021-11-07-AARCH64-APPLE-DARWIN(默认)
Rustc 1.58.0-oftightly(072799443 2021-11-06)
I have been trying to compile a Substarte project but getting this weird error.
error[E0282]: type annotations needed
--> /Users/ayushkumarmishra/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45
|
221 | curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
| -----^^^^^^--
| | |
| | cannot infer type for type parameter `T` declared on the trait `AsRef`
| this method call resolves to `&T`
|
= note: type must be known at this point
For more information about this error, try `rustc --explain E0282`.
error: could not compile `libp2p-noise` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Can somebody please help me to fix this?
Below is the output of rustup show
installed toolchains
stable-aarch64-apple-darwin
nightly-2021-08-31-aarch64-apple-darwin
nightly-2021-11-07-aarch64-apple-darwin (default)
installed targets for active toolchain
aarch64-apple-darwin
wasm32-unknown-unknown
active toolchain
nightly-2021-11-07-aarch64-apple-darwin (default)
rustc 1.58.0-nightly (072799443 2021-11-06)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论