Skip to content

Commit 4f120e6

Browse files
committed
auto merge of #15496 : ruud-v-a/rust/patch-1, r=huonw
Also removes redundant newline in code block.
2 parents f78d2f5 + 90b79b7 commit 4f120e6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/doc/rust.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -3889,12 +3889,11 @@ by the prefix operator `box`. When the standard library is in use, the type of a
38893889
An example of an owned box type and value:
38903890

38913891
~~~~
3892-
38933892
let x: Box<int> = box 10;
38943893
~~~~
38953894

3896-
Owned box values exist in 1:1 correspondence with their heap allocation
3897-
copying an owned box value makes a shallow copy of the pointer
3895+
Owned box values exist in 1:1 correspondence with their heap allocation,
3896+
copying an owned box value makes a shallow copy of the pointer.
38983897
Rust will consider a shallow copy of an owned box to move ownership of the value. After a value has been moved, the source location cannot be used unless it is reinitialized.
38993898

39003899
~~~~

0 commit comments

Comments
 (0)