Skip to content

Commit 1b8ee82

Browse files
author
Jakub Bukaj
committed
rollup merge of #19107: cakebaker/change_an_box_to_a_box
2 parents f71b852 + ebe812f commit 1b8ee82

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/doc/reference.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,19 +4039,19 @@ initialized; this is enforced by the compiler.
40394039

40404040
### Boxes
40414041

4042-
An _box_ is a reference to a heap allocation holding another value, which is
4042+
A _box_ is a reference to a heap allocation holding another value, which is
40434043
constructed by the prefix operator `box`. When the standard library is in use,
4044-
the type of an box is `std::owned::Box<T>`.
4044+
the type of a box is `std::owned::Box<T>`.
40454045

4046-
An example of an box type and value:
4046+
An example of a box type and value:
40474047

40484048
```
40494049
let x: Box<int> = box 10;
40504050
```
40514051

4052-
Box values exist in 1:1 correspondence with their heap allocation, copying an
4052+
Box values exist in 1:1 correspondence with their heap allocation, copying a
40534053
box value makes a shallow copy of the pointer. Rust will consider a shallow
4054-
copy of an box to move ownership of the value. After a value has been moved,
4054+
copy of a box to move ownership of the value. After a value has been moved,
40554055
the source location cannot be used unless it is reinitialized.
40564056

40574057
```

0 commit comments

Comments
 (0)