Closed matsbror closed 4 years ago
hi @matsbror, thanks for the issue/question.
It looks like you have old Rust version, the newer one has been recently released (https://blog.rust-lang.org/2020/10/08/Rust-1.47.html).
Please run rustup update
, try again and eventually close the issue. I can't reproduce it and it wouldn't pass through CI tests with compilation errors.
Great , that was indeed the issue.
I tried to run examples and the quickstart but gets build errors, all of the kind:
error[E0658]:
matchis not allowed in a
const fn`$ rustc -V rustc 1.45.0 (5c1f21c3b 2020-07-13) $ cargo make -V cargo-make 0.32.7
EDIT: Removing the
const
in the functions concerned resolves the issue. There seems to be work going on allowingconst
for function containing matches, but as far as I can see it's not released yet: https://github.com/rust-lang/rust/issues/49146Also building examples from the seed repository doesn't work.
cargo make start counter
match
is not allowed in aconst fn
--> src/browser/fetch/method.rs:19:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information
match
is not allowed in aconst fn
--> src/browser/fetch/status.rs:34:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
const fn
--> src/browser/fetch/status.rs:34:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
match
is not allowed in aconst fn
--> src/browser/service/fetch.rs:182:9const fn
--> src/browser/service/fetch.rs:182:9match
is not allowed in aconst fn
--> src/browser/service/fetch.rs:267:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:147:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:150:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:153:9if
is not allowed in aconst fn
--> src/virtual_dom/node.rs:157:9if
is not allowed in aconst fn
--> src/virtual_dom/node.rs:164:9match
is not allowed in aconst fn
--> src/virtual_dom/node/el.rs:307:9error: aborting due to 12 previous errors
For more information about this error, try
rustc --explain E0658
. error: could not compileseed
.To learn more, run the command again with --verbose. Error: Compiling your crate to WebAssembly failed Caused by: failed to execute
cargo build
: exited with exit code: 101 full command: "cargo" "build" "--lib" "--target" "wasm32-unknown-unknown" [cargo-make][1] ERROR - Error while executing command, exit code: 1 [cargo-make][1] WARN - Build Failed. [cargo-make] ERROR - Error while executing command, exit code: 1 [cargo-make] WARN - Build Failed.mats@DESKTOP-SET4FKI ~/embe/seed (master) $ less errors.log
mats@DESKTOP-SET4FKI ~/embe/seed (master) $ emacs errors.log
mats@DESKTOP-SET4FKI ~/embe/seed (master) $ cat
match
is not allowed in aconst fn
--> src/browser/fetch/method.rs:19:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information
match
is not allowed in aconst fn
--> src/browser/fetch/status.rs:34:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
const fn
--> src/browser/fetch/status.rs:34:9= note: see issue #49146 https://github.com/rust-lang/rust/issues/49146 for more information = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
match
is not allowed in aconst fn
--> src/browser/service/fetch.rs:182:9const fn
--> src/browser/service/fetch.rs:182:9match
is not allowed in aconst fn
--> src/browser/service/fetch.rs:267:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:147:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:150:9match
is not allowed in aconst fn
--> src/virtual_dom/node.rs:153:9if
is not allowed in aconst fn
--> src/virtual_dom/node.rs:157:9if
is not allowed in aconst fn
--> src/virtual_dom/node.rs:164:9match
is not allowed in aconst fn
--> src/virtual_dom/node/el.rs:307:9error: aborting due to 12 previous errors
For more information about this error, try
rustc --explain E0658
. error: could not compileseed
.To learn more, run the command again with --verbose. Error: Compiling your crate to WebAssembly failed Caused by: failed to execute
cargo build
: exited with exit code: 101 full command: "cargo" "build" "--lib" "--target" "wasm32-unknown-unknown" [cargo-make][1] ERROR - Error while executing command, exit code: 1 [cargo-make][1] WARN - Build Failed. [cargo-make] ERROR - Error while executing command, exit code: 1 [cargo-make] WARN - Build Failed.