问题
I ran into the same error, initially I tried with default nightly-2020-10-05, then nightly-2020-10-01 and nightly-2020-10-06... but nothing is working.
Steps followed to downgrade the nightly are :
- rustup uninstall nightly
- rustup install nightly-
- rustup target add wasm32-unknown-unknown --toolchain nightly-
- WASM_BUILD_TOOLCHAIN=nightly- cargo build --release
I have tried on both Windows and Ubuntu 18.04 environment. But every time I get the same error.
consider giving accuracy a type
回答1:
https://github.com/paritytech/substrate/issues/7287
rustup default nightly-2020-10-06 && rustup target add wasm32-unknown-unknown
Or just update to substrate 2.0.1, this issue is fixed in that version
回答2:
You can use rustup
to manage your version,
make sure your active toolchain is like this:
$ rustup show
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-2020-10-05-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin
installed targets for active toolchain
--------------------------------------
wasm32-unknown-unknown
x86_64-apple-darwin
active toolchain
----------------
nightly-2020-10-05-x86_64-apple-darwin (default)
rustc 1.49.0-nightly (beb5ae474 2020-10-04)
来源:https://stackoverflow.com/questions/65697367/substrate-error-consider-giving-accuracy-a-type