Skip to content

Commit bbe7119

Browse files
committed
Merge pull request #21014 from steveklabnik/gh20876
Clean up unary operators in the reference Reviewed-by: alexcrichton
2 parents e5713ba + 285277d commit bbe7119

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/doc/reference.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,8 +2967,8 @@ _panicked state_.
29672967

29682968
### Unary operator expressions
29692969

2970-
Rust defines six symbolic unary operators. They are all written as prefix
2971-
operators, before the expression they apply to.
2970+
Rust defines three unary operators. They are all written as prefix operators,
2971+
before the expression they apply to.
29722972

29732973
* `-`
29742974
: Negation. May only be applied to numeric types.
@@ -2986,13 +2986,6 @@ operators, before the expression they apply to.
29862986
: Logical negation. On the boolean type, this flips between `true` and
29872987
`false`. On integer types, this inverts the individual bits in the
29882988
two's complement representation of the value.
2989-
* `box`
2990-
: [Boxing](#pointer-types) operators. Allocate a box to hold the value they
2991-
are applied to, and store the value in it. `box` creates a box.
2992-
* `&`
2993-
: Borrow operator. Returns a reference, pointing to its operand. The operand
2994-
of a borrow is statically proven to outlive the resulting pointer. If the
2995-
borrow-checker cannot prove this, it is a compilation error.
29962989

29972990
### Binary operator expressions
29982991

0 commit comments

Comments
 (0)