Skip to content

Commit

Permalink
Added explanation to trpl of integer types.
Browse files Browse the repository at this point in the history
  • Loading branch information
jxcl committed Feb 15, 2015
1 parent 342ab53 commit 74ba529
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doc/trpl/variable-bindings.md
Expand Up @@ -40,6 +40,11 @@ let x: i32 = 5;
If I asked you to read this out loud to the rest of the class, you'd say "`x`
is a binding with the type `i32` and the value `five`."

In this case we chose to represent `x` as a 32-bit signed integer. Rust has
many different primitive integer types. They begin with `i` for signed integers
and `u` for unsigned integers. The possible integer sizes are 8, 16, 32, and 64
bits.

In future examples, we may annotate the type in a comment. The examples will
look like this:

Expand Down

0 comments on commit 74ba529

Please sign in to comment.