but this is not a legal expression in Rust. The expression either needs to be parenthesized (($a == $b) == $c or $a == ($b == $c)) or turned into a conjunction ($a == $b && $b == $c).
error: comparison operators cannot be chained
--> src/main.rs:2:18
|
2 | let _ = true == true == true;
| ^^ ^^
|
help: split the comparison into two
|
2 | let _ = true == true && true == true;
| +++++++
Previously, syn incorrectly accepted
$a == $b == $c
as an expression:but this is not a legal expression in Rust. The expression either needs to be parenthesized (
($a == $b) == $c
or$a == ($b == $c)
) or turned into a conjunction ($a == $b && $b == $c
).