Skip to content

Commit 74ba529

Browse files
committed
Added explanation to trpl of integer types.
1 parent 342ab53 commit 74ba529

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/doc/trpl/variable-bindings.md

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ let x: i32 = 5;
4040
If I asked you to read this out loud to the rest of the class, you'd say "`x`
4141
is a binding with the type `i32` and the value `five`."
4242

43+
In this case we chose to represent `x` as a 32-bit signed integer. Rust has
44+
many different primitive integer types. They begin with `i` for signed integers
45+
and `u` for unsigned integers. The possible integer sizes are 8, 16, 32, and 64
46+
bits.
47+
4348
In future examples, we may annotate the type in a comment. The examples will
4449
look like this:
4550

0 commit comments

Comments
 (0)