@@ -1636,8 +1636,9 @@ task in a _failing state_.
1636
1636
1637
1637
### Unary operator expressions
1638
1638
1639
- Rust defines five unary operators. They are all written as prefix
1640
- operators, before the expression they apply to.
1639
+ Rust defines six symbolic unary operators,
1640
+ in addition to the unary [ copy] ( #unary-copy-expressions ) and [ move] ( #unary-move-expressions ) operators.
1641
+ They are all written as prefix operators, before the expression they apply to.
1641
1642
1642
1643
` - `
1643
1644
: Negation. May only be applied to numeric types.
@@ -1652,9 +1653,12 @@ operators, before the expression they apply to.
1652
1653
` false ` . On integer types, this inverts the individual bits in the
1653
1654
two's complement representation of the value.
1654
1655
` @ ` and ` ~ `
1655
- : [ Boxing] ( #box-types ) operators. Allocate a box to hold the value
1656
- they are applied to, and store the value in it. ` @ ` creates a
1657
- shared, reference-counted box, whereas ` ~ ` creates a unique box.
1656
+ : [ Boxing] ( #pointer-types ) operators. Allocate a box to hold the value they are applied to,
1657
+ and store the value in it. ` @ ` creates a managed box, whereas ` ~ ` creates an owned box.
1658
+ ` & `
1659
+ : Borrow operator. Returns a borrowed pointer, pointing to its operand.
1660
+ The operand of a borrowed pointer is statically proven to outlive the resulting pointer.
1661
+ If the borrow-checker cannot prove this, it is a compilation error.
1658
1662
1659
1663
### Binary operator expressions
1660
1664
0 commit comments