Skip to content

Commit 2b5119f

Browse files
authored
Rollup merge of rust-lang#74390 - ColoredCarrot:patch-1, r=lcnr
Fix typo in std::mem::transmute documentation `u32::from_ge_bytes` function does not exist; replace with `u32::from_be_bytes`. It is clear that `u32::from_le_bytes` is not meant from the context; the latter is used correctly while `from_be_bytes` is misspelled.
2 parents a7c66d9 + 593c7fe commit 2b5119f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ extern "rust-intrinsic" {
11261126
///
11271127
/// // use `u32::from_ne_bytes` instead
11281128
/// let num = u32::from_ne_bytes(raw_bytes);
1129-
/// // or use `u32::from_le_bytes` or `u32::from_ge_bytes` to specify the endianness
1129+
/// // or use `u32::from_le_bytes` or `u32::from_be_bytes` to specify the endianness
11301130
/// let num = u32::from_le_bytes(raw_bytes);
11311131
/// assert_eq!(num, 0x12345678);
11321132
/// let num = u32::from_be_bytes(raw_bytes);

0 commit comments

Comments
 (0)