Skip to content

Commit

Permalink
Added explanation of the inclusion of "&&" on the borrow operator pro…
Browse files Browse the repository at this point in the history
…duction
  • Loading branch information
brauliobz committed Nov 30, 2017
1 parent b307133 commit 9c4b7a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/expressions/operator-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@ let mut array = [-2, 3, 9];
}
```

For ease of typing, consecutive borrow expressions can be expressed by the
single token `&&` as if they were separated:

```rust
// same meanings:
let a = && 10;
let a = & & 10;

// same meanings:
let a = && mut 10;
let a = & & mut 10;
```

## The dereference operator

> **<sup>Syntax</sup>**
Expand Down

0 comments on commit 9c4b7a1

Please sign in to comment.