From 74ba529701b166e098bf4852034b9b3448936477 Mon Sep 17 00:00:00 2001 From: Alexander Bliskovsky Date: Sun, 15 Feb 2015 13:51:36 -0500 Subject: [PATCH] Added explanation to trpl of integer types. --- src/doc/trpl/variable-bindings.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doc/trpl/variable-bindings.md b/src/doc/trpl/variable-bindings.md index 41c0e9de9b5..88babd8659c 100644 --- a/src/doc/trpl/variable-bindings.md +++ b/src/doc/trpl/variable-bindings.md @@ -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: