Clarify wording in transmute example

* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
This commit is contained in:
Postmodern 2016-05-19 13:12:11 -07:00
parent 2fb6f8e2c9
commit 345626f088

View file

@ -135,14 +135,14 @@ cast four bytes into a `u32`:
```rust,ignore
let a = [0u8, 0u8, 0u8, 0u8];
let b = a as u32; // four eights makes 32
let b = a as u32; // four u8s makes a u32
```
This errors with:
```text
error: non-scalar cast: `[u8; 4]` as `u32`
let b = a as u32; // four eights makes 32
let b = a as u32; // four u8s makes a u32
^~~~~~~~
```