diff options
| author | Postmodern <postmodern.mod3@gmail.com> | 2016-05-19 13:12:11 -0700 |
|---|---|---|
| committer | Postmodern <postmodern.mod3@gmail.com> | 2016-05-19 13:12:11 -0700 |
| commit | 345626f088bc2abac5257346f3f044376d7bac0b (patch) | |
| tree | b1060c492bab199e159c1212a599523fcaa333f1 | |
| parent | 2fb6f8e2c94a7041877ed8460f2621974c5233f7 (diff) | |
Clarify wording in `transmute` example
* Change "four eights" to "four u8s" * Change "a 32" to "a u32"
| -rw-r--r-- | src/doc/book/casting-between-types.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/book/casting-between-types.md b/src/doc/book/casting-between-types.md index 7056a6c0f17..a101f397c37 100644 --- a/src/doc/book/casting-between-types.md +++ b/src/doc/book/casting-between-types.md @@ -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 ^~~~~~~~ ``` |
