3

On cargo build --release in my substrate project I am getting

error[E0282]: type annotations needed
   --> /home/asmita-mfs/.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

What can be the reason for the above error. The above error is coming when I tried to integrate eth-light-client pallet in my substrate project created from monthly-2021-09+1 tag
https://github.com/webb-tools/substrate-eth-light-client/tree/drew/update-to-recent-substrate/pallets/light-client

1 Answer 1

1

I'd make sure you're using a nightly from at least 2021-09-1. It's probably just that you're using an earlier compiler that was not as clever. In general using a nightly from near the tag is likely to be a good call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.