diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-12-24 00:20:12 +0100 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-12-24 00:41:10 +0100 |
| commit | 1b438314a07d4cc2ecf0d82cd195e28bef73eac2 (patch) | |
| tree | 55415f34eee8c37b58716c844eeaed7674923ece /src | |
| parent | 42c3ef8f9fd4b0dd1f881c49323bad456163f202 (diff) | |
| download | rust-1b438314a07d4cc2ecf0d82cd195e28bef73eac2.tar.gz rust-1b438314a07d4cc2ecf0d82cd195e28bef73eac2.zip | |
book: Some operator fixes for the syntax index
- Correct the names of the comparison traits (PartialOrd) - Mention only the traits that overload the operator (PartialOrd, PartialEq), not operator-unrelated traits (Ord, Eq). - Add `!=` operator.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/book/syntax-index.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/doc/book/syntax-index.md b/src/doc/book/syntax-index.md index 01f06f718f8..f7e32943c63 100644 --- a/src/doc/book/syntax-index.md +++ b/src/doc/book/syntax-index.md @@ -41,6 +41,7 @@ * `!` (`ident!(…)`, `ident!{…}`, `ident![…]`): denotes macro expansion. See [Macros]. * `!` (`!expr`): bitwise or logical complement. Overloadable (`Not`). +* `!=` (`var != expr`): nonequality comparison. Overloadable (`PartialEq`). * `%` (`expr % expr`): arithmetic remainder. Overloadable (`Rem`). * `%=` (`var %= expr`): arithmetic remainder & assignment. * `&` (`expr & expr`): bitwise and. Overloadable (`BitAnd`). @@ -75,13 +76,13 @@ * `;` (`[…; len]`): part of fixed-size array syntax. See [Primitive Types (Arrays)]. * `<<` (`expr << expr`): left-shift. Overloadable (`Shl`). * `<<=` (`var <<= expr`): left-shift & assignment. -* `<` (`expr < expr`): less-than comparison. Overloadable (`Cmp`, `PartialCmp`). -* `<=` (`var <= expr`): less-than or equal-to comparison. Overloadable (`Cmp`, `PartialCmp`). +* `<` (`expr < expr`): less-than comparison. Overloadable (`PartialOrd`). +* `<=` (`var <= expr`): less-than or equal-to comparison. Overloadable (`PartialOrd`). * `=` (`var = expr`, `ident = type`): assignment/equivalence. See [Variable Bindings], [`type` Aliases], generic parameter defaults. -* `==` (`var == expr`): comparison. Overloadable (`Eq`, `PartialEq`). +* `==` (`var == expr`): equality comparison. Overloadable (`PartialEq`). * `=>` (`pat => expr`): part of match arm syntax. See [Match]. -* `>` (`expr > expr`): greater-than comparison. Overloadable (`Cmp`, `PartialCmp`). -* `>=` (`var >= expr`): greater-than or equal-to comparison. Overloadable (`Cmp`, `PartialCmp`). +* `>` (`expr > expr`): greater-than comparison. Overloadable (`PartialOrd`). +* `>=` (`var >= expr`): greater-than or equal-to comparison. Overloadable (`PartialOrd`). * `>>` (`expr >> expr`): right-shift. Overloadable (`Shr`). * `>>=` (`var >>= expr`): right-shift & assignment. * `@` (`ident @ pat`): pattern binding. See [Patterns (Bindings)]. |
