Skip to content

Commit fb1ce8a

Browse files
authored
Merge pull request #932 from ojeda/typos-in-comparison-ops
Fix plural and delete spurious words in comparison ops
2 parents 20d9fe6 + 5967ac1 commit fb1ce8a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/expressions/operator-expr.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -246,19 +246,18 @@ assert_eq!(-10 >> 2, -3);
246246
>    | [_Expression_] `>=` [_Expression_]\
247247
> &nbsp;&nbsp; | [_Expression_] `<=` [_Expression_]
248248
249-
Comparison operators are also defined both for primitive types and many type in
250-
the standard library. Parentheses are required when chaining comparison
249+
Comparison operators are also defined both for primitive types and many types
250+
in the standard library. Parentheses are required when chaining comparison
251251
operators. For example, the expression `a == b == c` is invalid and may be
252252
written as `(a == b) == c`.
253253

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

263262
```rust
264263
# let a = 1;

0 commit comments

Comments
 (0)