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

Fix plural and delete spurious words in comparison ops #932

Merged
merged 1 commit into from
Jan 14, 2021
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
19 changes: 9 additions & 10 deletions src/expressions/operator-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,18 @@ assert_eq!(-10 >> 2, -3);
>    | [_Expression_] `>=` [_Expression_]\
> &nbsp;&nbsp; | [_Expression_] `<=` [_Expression_]

Comparison operators are also defined both for primitive types and many type in
the standard library. Parentheses are required when chaining comparison
Comparison operators are also defined both for primitive types and many types
in the standard library. Parentheses are required when chaining comparison
operators. For example, the expression `a == b == c` is invalid and may be
written as `(a == b) == c`.

Unlike arithmetic and logical operators, the traits for
overloading the operators the traits for these operators are used more
generally to show how a type may be compared and will likely be assumed to
define actual comparisons by functions that use these traits as bounds. Many
functions and macros in the standard library can then use that assumption
(although not to ensure safety). Unlike the arithmetic and logical operators
above, these operators implicitly take shared borrows of their operands,
evaluating them in [place expression context][place expression]:
Unlike arithmetic and logical operators, the traits for overloading these
operators are used more generally to show how a type may be compared and will
likely be assumed to define actual comparisons by functions that use these
traits as bounds. Many functions and macros in the standard library can then
use that assumption (although not to ensure safety). Unlike the arithmetic
and logical operators above, these operators implicitly take shared borrows
of their operands, evaluating them in [place expression context][place expression]:

```rust
# let a = 1;
Expand Down