- I try to "https://substrate.dev/substrate-contracts-workshop/#/"
- I followed the tutorial to create a Rust environment.
- And I executed "cargo +nightly test"
- I get following Error.
error[E0658]: function pointers cannot appear in constant functions
--> /Users/shin.takahashi/.cargo/git/checkouts/ink-1add513eda8f5a89/cca3154/lang/src/dispatcher.rs:186:30
|
186 | pub const fn new(dispatchable: $dispatchable_fn<Msg, S>) -> Self {
| ^^^^^^^^^^^^
...
237 | / impl_dispatcher_for! {
238 | | /// Dispatcher for storage preserving messages.
239 | | struct Dispatcher(DispatchableFn);
240 | | }
| |_- in this macro invocation
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
Please tell me what is wrong???
I couldn't solve it, but I was able to make it compilable and executable. Correct the error part of ~ / .cargo / git / checkouts / ink-XXXXX / cca-XXXX / lang / source / disposacher.rs as follows.