From 593c7fe6d6b44c87df07d62996cf575fb3f62ce9 Mon Sep 17 00:00:00 2001 From: ColoredCarrot Date: Thu, 16 Jul 2020 11:04:01 +0200 Subject: [PATCH] Fix typo in std::mem::transmute documentation u32::from_ge_bytes method does not exist; replace with u32::from_be_bytes --- src/libcore/intrinsics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 540a8cfb290b3..45b636b0089b2 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -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);