Skip to content

Commit

Permalink
Rollup merge of #33745 - postmodern:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
Clarify wording in `transmute` example

* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
  • Loading branch information
GuillaumeGomez committed May 20, 2016
2 parents c67dae8 + 345626f commit 4a3ba87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/casting-between-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
^~~~~~~~
```

Expand Down

0 comments on commit 4a3ba87

Please sign in to comment.