Skip to content

Commit ffb1f01

Browse files
workingjubileeRenjiSann
authored andcommitted
Rollup merge of rust-lang#122762 - RoboSchmied:RoboSchmied-typo, r=workingjubilee
fix typo of endianness fix typo endianess -> endianness
2 parents 8baa6bb + 0d5a3f4 commit ffb1f01

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

compiler/stable_mir/src/mir/alloc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl IndexedVal for AllocId {
5555
/// Utility function used to read an allocation data into a unassigned integer.
5656
pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
5757
let mut buf = [0u8; std::mem::size_of::<u128>()];
58-
match MachineInfo::target_endianess() {
58+
match MachineInfo::target_endianness() {
5959
Endian::Little => {
6060
bytes.read_exact(&mut buf[..bytes.len()])?;
6161
Ok(u128::from_le_bytes(buf))
@@ -70,7 +70,7 @@ pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
7070
/// Utility function used to read an allocation data into an assigned integer.
7171
pub(crate) fn read_target_int(mut bytes: &[u8]) -> Result<i128, Error> {
7272
let mut buf = [0u8; std::mem::size_of::<i128>()];
73-
match MachineInfo::target_endianess() {
73+
match MachineInfo::target_endianness() {
7474
Endian::Little => {
7575
bytes.read_exact(&mut buf[..bytes.len()])?;
7676
Ok(i128::from_le_bytes(buf))

compiler/stable_mir/src/target.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl MachineInfo {
1414
with(|cx| cx.target_info())
1515
}
1616

17-
pub fn target_endianess() -> Endian {
17+
pub fn target_endianness() -> Endian {
1818
with(|cx| cx.target_info().endian)
1919
}
2020

library/core/src/intrinsics/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ extern "rust-intrinsic" {
470470
/// No matter whether the output is an array or an unsigned integer, it is treated as a single
471471
/// contiguous list of bits. The bitmask is always packed on the least-significant side of the
472472
/// output, and padded with 0s in the most-significant bits. The order of the bits depends on
473-
/// endianess:
473+
/// endianness:
474474
///
475475
/// * On little endian, the least significant bit corresponds to the first vector element.
476476
/// * On big endian, the least significant bit corresponds to the last vector element.

src/tools/miri/src/shims/intrinsics/simd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
457457
let bitmask_len = u32::try_from(bitmask_len).unwrap();
458458

459459
// To read the mask, we transmute it to an integer.
460-
// That does the right thing wrt endianess.
460+
// That does the right thing wrt endianness.
461461
let mask_ty = this.machine.layouts.uint(mask.layout.size).unwrap();
462462
let mask = mask.transmute(mask_ty, this)?;
463463
let mask: u64 = this.read_scalar(&mask)?.to_bits(mask_ty.size)?.try_into().unwrap();
@@ -509,7 +509,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
509509
}
510510
}
511511
// We have to change the type of the place to be able to write `res` into it. This
512-
// transmutes the integer to an array, which does the right thing wrt endianess.
512+
// transmutes the integer to an array, which does the right thing wrt endianness.
513513
let dest =
514514
dest.transmute(this.machine.layouts.uint(dest.layout.size).unwrap(), this)?;
515515
this.write_int(res, &dest)?;

src/tools/miri/src/shims/unix/linux/fd/event.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl FileDescriptor for Event {
3838
}
3939

4040
/// A write call adds the 8-byte integer value supplied in
41-
/// its buffer (in native endianess) to the counter. The maximum value that may be
41+
/// its buffer (in native endianness) to the counter. The maximum value that may be
4242
/// stored in the counter is the largest unsigned 64-bit value
4343
/// minus 1 (i.e., 0xfffffffffffffffe). If the addition would
4444
/// cause the counter's value to exceed the maximum, then the
@@ -57,7 +57,7 @@ impl FileDescriptor for Event {
5757
) -> InterpResult<'tcx, io::Result<usize>> {
5858
let v1 = self.val.get();
5959
let bytes: [u8; 8] = bytes.try_into().unwrap(); // FIXME fail gracefully when this has the wrong size
60-
// Convert from target endianess to host endianess.
60+
// Convert from target endianness to host endianness.
6161
let num = match tcx.sess.target.endian {
6262
Endian::Little => u64::from_le_bytes(bytes),
6363
Endian::Big => u64::from_be_bytes(bytes),

0 commit comments

Comments
 (0)