about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2025-03-04 20:28:38 -0800
committerThalia Archibald <thalia@archibald.dev>2025-03-07 13:37:04 -0800
commit38fad984c616cf4d10f653fa50c85cdc01083373 (patch)
tree7f4adb9e03b34d02336020ce9123e6dd1e2bb12f /compiler/rustc_codegen_ssa
parentac951d379913c667a1fb73a0830e81d65d2007cf (diff)
downloadrust-38fad984c616cf4d10f653fa50c85cdc01083373.tar.gz
rust-38fad984c616cf4d10f653fa50c85cdc01083373.zip
compiler: Use size_of from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index a170b2e3b6a..d2d29ef2ee5 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1177,7 +1177,7 @@ mod win {
             let mut cp: u32 = 0;
             // We're using the `LOCALE_RETURN_NUMBER` flag to return a u32.
             // But the API requires us to pass the data as though it's a [u16] string.
-            let len = std::mem::size_of::<u32>() / std::mem::size_of::<u16>();
+            let len = size_of::<u32>() / size_of::<u16>();
             let data = std::slice::from_raw_parts_mut(&mut cp as *mut u32 as *mut u16, len);
             let len_written = GetLocaleInfoEx(
                 LOCALE_NAME_SYSTEM_DEFAULT,