ı'm trying to compile the smart contract with "cargo +nightly contract build" but it gives this error below. Everything is up to date. I can't seem to find the answer. Please help me on this matter.
Updating crates.io index
Compiling flipper v0.1.0 (/private/var/folders/0n/pj5x0p_n66q348m2wdhdm3w00000gn/T/cargo-contract_43QsMb)
error[E0158]: associated consts cannot be referenced in patterns
--> /Users/arifburakkorkmaz/flipper/lib.rs:8:5
|
8 | / /// Defines the storage of your contract.
9 | | /// Add new fields to the below struct in order
10 | | /// to add new static storage fields to your contract.
11 | | #[ink(storage)]
... |
14 | | value: bool,
15 | | }
| |_____^
For more information about this error, try `rustc --explain E0158`.
error: could not compile `flipper` due to previous error
ERROR: `"/Users/arifburakkorkmaz/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo" "build" "--target=wasm32-unknown-unknown" "-Zbuild-std" "--no-default-features" "--release" "--target-dir=/Users/arifburakkorkmaz/flipper/target/ink" "--features=ink_env/ink-debug"` failed with exit code: Some(101)
cargo +nightly-2022-08-15 test
rathercargo +nightly test
to test andcargo +nightly-2022-08-15 contract build
to build rathercargo +nightly contract build
today and it works for me. Mycargo contract version cargo-contract 1.5.0-unknown-x86_64-apple-darwin
andrustc 1.66.0-nightly (c0983a9aa 2022-10-12))