Skip to content

Commit

Permalink
Add description of by-move mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Apr 11, 2012
1 parent fd26743 commit 9e726b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,13 @@ fn make_person(+name: str, +address: str) -> person {
}
~~~~

Finally there is by-move style, written `-`. This indicates that the
function will take ownership of the argument, like with by-copy style,
but a copy must not be made. The caller is (statically) obliged to not
use the argument after the call; it is de-initialized as part of the
call. This is used to support ownership-passing in the presence of
non-copyable types.

# Generics

## Generic functions
Expand Down

0 comments on commit 9e726b0

Please sign in to comment.