Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

error[E0424]: expected value, found module self installing subkey #53

Closed
01willtx opened this issue Jun 7, 2020 · 4 comments
Closed

Comments

@01willtx
Copy link

01willtx commented Jun 7, 2020

Tutorial https://substrate.dev/docs/en/tutorials/start-a-private-network/keygen error during subkey compile.

Command:
cargo install --force subkey --git https://github.com/paritytech/substrate --tag v2.0.0-rc2

Error:
Compiling sp-consensus-babe v0.8.0-rc2 (/Users/wlopez/.cargo/git/checkouts/substrate-7e08433d4c370a21/45b9f0a/primitives/consensus/babe)
error[E0424]: expected value, found module self
--> /Users/wlopez/.cargo/git/checkouts/substrate- 7e08433d4c370a21/45b9f0a/frame/support/src/traits.rs:913:11
|
911 | / bitmask! {
912 | | /// Reasons for moving funds out of an account.
913 | | #[derive(Encode, Decode)]
| | ^^^^^^ self value is a keyword only available in methods with a self parameter
914 | | pub mask WithdrawReasons: i8 where
... |
929 | | }
930 | | }
| |_- this function has a self parameter, but a macro invocation can only access identifiers it receives from parameters
|
= note: this error originate

I'll continue using the ui to generate the keys but thought I should report the issue.

@danforbes
Copy link
Contributor

Are you on Windows by any chance? I have seen errors like this when Windows users are using the wrong Rust nightly build.

@JoshOrndorff
Copy link
Contributor

JoshOrndorff commented Jun 8, 2020

Thanks for reporting this issue. It started with an update to the nightly compiler, which has since been reverted. See paritytech/substrate#6167 for more details. Updating your rust toolchain should help. (Edit: commands to update toolchain below)

@danforbes
Copy link
Contributor

@JoshOrndorff, can you provide the command that should be used (or a link to the command that can be used) to update the Rust toolchain?

@JoshOrndorff
Copy link
Contributor

These commands should work for updating your rust toolchain. I took them from getsubstrate.io

rustup update
rustup default stable
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants