Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that parentheses are required for chained comparison operators (RFC 0). #41

Merged
merged 2 commits into from
Apr 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ operators on standard types is given here.
: Greater than or equal.
Calls the `ge` method on the `std::cmp::PartialOrd` trait.

Parentheses are required when chaining comparison operators. For example, the
expression `a == b == c` is invalid and may be written as `(a == b) == c`.

### Type cast expressions

A type cast expression is denoted with the binary operator `as`.
Expand Down