4

I am following this PR https://github.com/substrate-developer-hub/substrate-parachain-template/pull/103 to upgrade codebase to Polkadot 0.9.18 but facing the below issue

   Compiling cexpr v0.6.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
   --> /home/deployer/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6
    |
314 | impl<T: ?Sized + Pointable> Atomic<T> {
    |      ^
...
346 |     pub const fn null() -> Atomic<T> {
    |     -------------------------------- function declared as const here
    |
    = note: see issue #93706 <https://github.com/rust-lang/rust/issues/93706> for more information
    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.
error: could not compile `crossbeam-epoch` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

Can someone please help me to fix this? Here is code https://github.com/DataHighway-DHX/DataHighway-Parachain/tree/change-para-id

installed toolchains

nightly-2022-02-23-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-2022-02-23-x86_64-unknown-linux-gnu (directory override for '/home/deployer/Parachain')
rustc 1.61.0-nightly (68369a041 2022-02-22)

1
  • Have you tried to upgrade your rust toolchain? You can do that by rustup update and rustup update nightly
    – h4x3rotab
    Mar 23, 2022 at 6:30

1 Answer 1

2

I was able to update that repository to branch 'polkadot-v0.9.18' that is used by Cumulus and Substrate repositories and it compiled successfully in the PR here.

The approach that I used to update it was to:

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.