From 5967ac11bcc3c8279ddd32b121001afda72ab42a Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Thu, 14 Jan 2021 13:46:08 +0100 Subject: [PATCH] Fix plural and delete spurious words in comparison ops Signed-off-by: Miguel Ojeda --- src/expressions/operator-expr.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/expressions/operator-expr.md b/src/expressions/operator-expr.md index 302751fab..acc6da26b 100644 --- a/src/expressions/operator-expr.md +++ b/src/expressions/operator-expr.md @@ -246,19 +246,18 @@ assert_eq!(-10 >> 2, -3); >    | [_Expression_] `>=` [_Expression_]\ >    | [_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;