Skip to content

Commit

Permalink
auto merge of #14805 : zzmp/rust/patch-1, r=alexcrichton
Browse files Browse the repository at this point in the history
The guide previously stated:

> The compiler will automatically convert a box box point to a reference like &point.

This fixes the doubled word `box`, so the statement reads

> The compiler will automatically convert a box point to a reference like &point.

The code it is referring to is `compute_distance(&on_the_stack, on_the_heap);`, so a single `box` is appropriate.
  • Loading branch information
bors committed Jun 12, 2014
2 parents 87bf47a + 782c52a commit c0a6f72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/guide-lifetimes.md
Expand Up @@ -78,7 +78,7 @@ value. We also call this _borrowing_ the local variable
name for the same data.

In the case of `on_the_heap`, however, no explicit action is necessary.
The compiler will automatically convert a box box point to a reference like &point.
The compiler will automatically convert a box point to a reference like &point.
This is another form of borrowing; in this case, the contents of the owned box
are being lent out.

Expand Down

0 comments on commit c0a6f72

Please sign in to comment.