Skip to content

Commit

Permalink
doc: add note below diagram about memory layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Div Shekhar committed Jan 16, 2014
1 parent 065f936 commit 8f93d39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/tutorial.md
Expand Up @@ -1025,6 +1025,11 @@ box, while the owner holds onto a pointer to it:
list -> | Cons | 1 | ~ | -> | Cons | 2 | ~ | -> | Cons | 3 | ~ | -> | Nil |
+--------------+ +--------------+ +--------------+ +--------------+

> Note: the above diagram shows the logical contents of the enum. The actual
> memory layout of the enum may vary. For example, for the `List` enum shown
> above, Rust guarantees that there will be no enum tag field in the actual
> structure. See the language reference for more details.
An owned box is a common example of a type with a destructor. The allocated
memory is cleaned up when the box is destroyed.

Expand Down

5 comments on commit 8f93d39

@bors
Copy link
Contributor

@bors bors commented on 8f93d39 Jan 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 8f93d39 Jan 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging divtxt/rust/master = 8f93d39 into auto

@bors
Copy link
Contributor

@bors bors commented on 8f93d39 Jan 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divtxt/rust/master = 8f93d39 merged ok, testing candidate = 1a9641b

@bors
Copy link
Contributor

@bors bors commented on 8f93d39 Jan 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 8f93d39 Jan 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 1a9641b

Please sign in to comment.