We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 065f936 commit 8f93d39Copy full SHA for 8f93d39
doc/tutorial.md
@@ -1025,6 +1025,11 @@ box, while the owner holds onto a pointer to it:
1025
list -> | Cons | 1 | ~ | -> | Cons | 2 | ~ | -> | Cons | 3 | ~ | -> | Nil |
1026
+--------------+ +--------------+ +--------------+ +--------------+
1027
1028
+> Note: the above diagram shows the logical contents of the enum. The actual
1029
+> memory layout of the enum may vary. For example, for the `List` enum shown
1030
+> above, Rust guarantees that there will be no enum tag field in the actual
1031
+> structure. See the language reference for more details.
1032
+
1033
An owned box is a common example of a type with a destructor. The allocated
1034
memory is cleaned up when the box is destroyed.
1035
0 commit comments