diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index fc2c431ca0f..8ff78166a9f 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -536,7 +536,7 @@ impl f32 { Self::from_bits(u32::from_be_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in little endian. /// /// # Examples /// @@ -551,7 +551,7 @@ impl f32 { Self::from_bits(u32::from_le_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in native endian. /// /// As the target platform's native endianness is used, portable code /// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 6bd0b6e5c7f..d45c04f45af 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -549,7 +549,7 @@ impl f64 { Self::from_bits(u64::from_be_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in little endian. /// /// # Examples /// @@ -564,7 +564,7 @@ impl f64 { Self::from_bits(u64::from_le_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in native endian. /// /// As the target platform's native endianness is used, portable code /// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as