Rollup merge of #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.
This commit is contained in:
Manish Goregaokar 2020-07-16 11:18:57 -07:00 committed by GitHub
commit f821109ee2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1126,7 +1126,7 @@ extern "rust-intrinsic" {
///
/// // use `u32::from_ne_bytes` instead
/// let num = u32::from_ne_bytes(raw_bytes);
/// // or use `u32::from_le_bytes` or `u32::from_ge_bytes` to specify the endianness
/// // or use `u32::from_le_bytes` or `u32::from_be_bytes` to specify the endianness
/// let num = u32::from_le_bytes(raw_bytes);
/// assert_eq!(num, 0x12345678);
/// let num = u32::from_be_bytes(raw_bytes);