about summary refs log tree commit diff
path: root/doc/tutorial.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tutorial.md')
-rw-r--r--doc/tutorial.md16
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index 1e9b64c9e22..14dfc884122 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -361,17 +361,19 @@ Rust's set of operators contains very few surprises. Arithmetic is done with
 also a unary prefix operator that negates numbers. As in C, the bitwise operators
 `>>`, `<<`, `&`, `|`, and `^` are also supported.
 
-Note that, if applied to an integer value, `!` flips all the bits (like `~` in
-C).
+Note that, if applied to an integer value, `!` flips all the bits (bitwise
+NOT, like `~` in C).
 
 The comparison operators are the traditional `==`, `!=`, `<`, `>`,
 `<=`, and `>=`. Short-circuiting (lazy) boolean operators are written
 `&&` (and) and `||` (or).
 
-For type casting, Rust uses the binary `as` operator.  It takes an
-expression on the left side and a type on the right side and will,
-if a meaningful conversion exists, convert the result of the
-expression to the given type.
+For compile-time type casting, Rust uses the binary `as` operator.  It takes
+an expression on the left side and a type on the right side and will, if a
+meaningful conversion exists, convert the result of the expression to the
+given type. Generally, `as` is only used with the primitive numeric types or
+pointers, and is not overloadable.  [`transmute`][transmute] can be used for
+unsafe C-like casting of same-sized types.
 
 ~~~~
 let x: f64 = 4.0;
@@ -379,6 +381,8 @@ let y: uint = x as uint;
 assert!(y == 4u);
 ~~~~
 
+[transmute]: http://static.rust-lang.org/doc/master/std/cast/fn.transmute.html
+
 ## Syntax extensions
 
 *Syntax extensions* are special forms that are not built into the language,