You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: expected `{`, found `}`
--> src/main.rs:4:13
|
4 | let x = condval!(if if true { true } else { false } { "a" } else { "b" });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{`
|
note: the `if` expression is missing a block after this condition
--> src/main.rs:4:28
|
4 | let x = condval!(if if true { true } else { false } { "a" } else { "b" });
| ^^^^
= note: this error originates in the macro `$crate::__condval_parser` which comes from the expansion of the macro `condval` (in Nightly builds, run with -Z macro-backtrace for more info)
error: no rules expected the token `{`
--> src/main.rs:4:47
|
4 | let x = condval!(if if true { true } else { false } { "a" } else { "b" });
| ^ no rules expected this token in macro call
|
note: while trying to match `if`
--> condtype/src/lib.rs:212:6
|
212 | (if let $pat:pat = $input:block $then:block else $else:block) => {
| ^^
error: could not compile `condtype` (bin "condtype") due to 2 previous errors
The text was updated successfully, but these errors were encountered:
The following Rust statement works:
But the same wrapped in
condval!
does not parse:The text was updated successfully, but these errors were encountered: