diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2025-03-04 20:28:38 -0800 |
|---|---|---|
| committer | Thalia Archibald <thalia@archibald.dev> | 2025-03-07 13:37:04 -0800 |
| commit | 38fad984c616cf4d10f653fa50c85cdc01083373 (patch) | |
| tree | 7f4adb9e03b34d02336020ce9123e6dd1e2bb12f /compiler/rustc_session/src/filesearch.rs | |
| parent | ac951d379913c667a1fb73a0830e81d65d2007cf (diff) | |
| download | rust-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_session/src/filesearch.rs')
| -rw-r--r-- | compiler/rustc_session/src/filesearch.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index ec83761da4a..cc2decc2fe4 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -92,7 +92,7 @@ fn current_dll_path() -> Result<PathBuf, String> { if libc::loadquery( libc::L_GETINFO, buffer.as_mut_ptr() as *mut u8, - (std::mem::size_of::<libc::ld_info>() * buffer.len()) as u32, + (size_of::<libc::ld_info>() * buffer.len()) as u32, ) >= 0 { break; |
