@@ -1697,7 +1697,7 @@ The default meaning of the operators on standard types is given here.
1697
1697
1698
1698
#### Bitwise operators
1699
1699
1700
- Bitwise operators apply are, like the [ arithmetic operators] ( #arithmetic-operators ) ,
1700
+ Bitwise operators are, like the [ arithmetic operators] ( #arithmetic-operators ) ,
1701
1701
syntactic sugar for calls to built-in traits.
1702
1702
This means that bitwise operators can be overridden for user-defined types.
1703
1703
The default meaning of the operators on standard types is given here.
@@ -1730,21 +1730,31 @@ and `&&` only when it evaluates to `true`.
1730
1730
1731
1731
#### Comparison operators
1732
1732
1733
+ Comparison operators are, like the [ arithmetic operators] ( #arithmetic-operators ) ,
1734
+ and [ bitwise operators] ( #bitwise-operators ) ,
1735
+ syntactic sugar for calls to built-in traits.
1736
+ This means that comparison operators can be overridden for user-defined types.
1737
+ The default meaning of the operators on standard types is given here.
1738
+
1733
1739
` == `
1734
1740
: Equal to.
1741
+ Calls the ` eq ` method on the ` core::cmp::Eq ` trait.
1735
1742
` != `
1736
1743
: Unequal to.
1744
+ Calls the ` ne ` method on the ` core::cmp::Eq ` trait.
1737
1745
` < `
1738
1746
: Less than.
1747
+ Calls the ` lt ` method on the ` core::cmp::Ord ` trait.
1739
1748
` > `
1740
1749
: Greater than.
1750
+ Calls the ` gt ` method on the ` core::cmp::Ord ` trait.
1741
1751
` <= `
1742
1752
: Less than or equal.
1753
+ Calls the ` le ` method on the ` core::cmp::Ord ` trait.
1743
1754
` >= `
1744
1755
: Greater than or equal.
1756
+ Calls the ` ge ` method on the ` core::cmp::Ord ` trait.
1745
1757
1746
- The binary comparison operators can be applied to any two operands of
1747
- the same type, and produce a boolean value.
1748
1758
1749
1759
#### Type cast expressions
1750
1760
0 commit comments