diff options
| author | Ralf Jung <post@ralfj.de> | 2024-03-25 17:17:57 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-03-25 17:17:57 +0100 |
| commit | d8be714fee3fee35ede441e78f29773f2632b10f (patch) | |
| tree | 1885870e6aa3f50b718be59e6b5cb64834e511d6 /compiler/stable_mir/src | |
| parent | 5b1319c754775460dd479d76826da1ed4d8552ae (diff) | |
| parent | cb7c63606e53715f94f3ba04d38e50772e4cd23d (diff) | |
| download | rust-d8be714fee3fee35ede441e78f29773f2632b10f.tar.gz rust-d8be714fee3fee35ede441e78f29773f2632b10f.zip | |
Merge from rustc
Diffstat (limited to 'compiler/stable_mir/src')
| -rw-r--r-- | compiler/stable_mir/src/mir/alloc.rs | 4 | ||||
| -rw-r--r-- | compiler/stable_mir/src/target.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/stable_mir/src/mir/alloc.rs b/compiler/stable_mir/src/mir/alloc.rs index 66457933438..408e0bafa58 100644 --- a/compiler/stable_mir/src/mir/alloc.rs +++ b/compiler/stable_mir/src/mir/alloc.rs @@ -55,7 +55,7 @@ impl IndexedVal for AllocId { /// Utility function used to read an allocation data into a unassigned integer. pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> { let mut buf = [0u8; std::mem::size_of::<u128>()]; - match MachineInfo::target_endianess() { + match MachineInfo::target_endianness() { Endian::Little => { bytes.read_exact(&mut buf[..bytes.len()])?; Ok(u128::from_le_bytes(buf)) @@ -70,7 +70,7 @@ pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> { /// Utility function used to read an allocation data into an assigned integer. pub(crate) fn read_target_int(mut bytes: &[u8]) -> Result<i128, Error> { let mut buf = [0u8; std::mem::size_of::<i128>()]; - match MachineInfo::target_endianess() { + match MachineInfo::target_endianness() { Endian::Little => { bytes.read_exact(&mut buf[..bytes.len()])?; Ok(i128::from_le_bytes(buf)) diff --git a/compiler/stable_mir/src/target.rs b/compiler/stable_mir/src/target.rs index 3a9011a2ffe..e00a418c540 100644 --- a/compiler/stable_mir/src/target.rs +++ b/compiler/stable_mir/src/target.rs @@ -14,7 +14,7 @@ impl MachineInfo { with(|cx| cx.target_info()) } - pub fn target_endianess() -> Endian { + pub fn target_endianness() -> Endian { with(|cx| cx.target_info().endian) } |
