Skip to content

Commit c0a6f72

Browse files
committed
auto merge of #14805 : zzmp/rust/patch-1, r=alexcrichton
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.
2 parents 87bf47a + 782c52a commit c0a6f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/guide-lifetimes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ value. We also call this _borrowing_ the local variable
7878
name for the same data.
7979

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

0 commit comments

Comments
 (0)