Skip to content

Commit 4a3ba87

Browse files
Rollup merge of rust-lang#33745 - postmodern:patch-1, r=steveklabnik
Clarify wording in `transmute` example * Change "four eights" to "four u8s" * Change "a 32" to "a u32"
2 parents c67dae8 + 345626f commit 4a3ba87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/casting-between-types.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ cast four bytes into a `u32`:
135135
```rust,ignore
136136
let a = [0u8, 0u8, 0u8, 0u8];
137137
138-
let b = a as u32; // four eights makes 32
138+
let b = a as u32; // four u8s makes a u32
139139
```
140140

141141
This errors with:
142142

143143
```text
144144
error: non-scalar cast: `[u8; 4]` as `u32`
145-
let b = a as u32; // four eights makes 32
145+
let b = a as u32; // four u8s makes a u32
146146
^~~~~~~~
147147
```
148148

0 commit comments

Comments
 (0)