From bbda64815589b2b4eb4949bc68de6a38b051397d Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 27 Nov 2024 17:35:25 -0500 Subject: [PATCH] Fixups with new script --- src/fixed_width_ints.rs | 1 + src/teeos/mod.rs | 3 +-- src/unix/bsd/netbsdlike/netbsd/riscv64.rs | 2 +- src/unix/bsd/netbsdlike/openbsd/arm.rs | 2 +- src/unix/bsd/netbsdlike/openbsd/powerpc64.rs | 2 ++ src/unix/redox/mod.rs | 3 +-- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fixed_width_ints.rs b/src/fixed_width_ints.rs index 1900833ff78f9..93439f989c701 100644 --- a/src/fixed_width_ints.rs +++ b/src/fixed_width_ints.rs @@ -1,6 +1,7 @@ //! This module contains type aliases for C's fixed-width integer types . //! //! These aliases are deprecated: use the Rust types instead. +use crate::prelude::*; #[deprecated(since = "0.2.55", note = "Use i8 instead.")] pub type int8_t = i8; diff --git a/src/teeos/mod.rs b/src/teeos/mod.rs index a46587d111108..290ab89062321 100644 --- a/src/teeos/mod.rs +++ b/src/teeos/mod.rs @@ -4,11 +4,10 @@ //! when linking is explicitly requested. #![allow(non_camel_case_types)] #![allow(non_snake_case)] - // only supported on Rust > 1.59, so we can directly reexport c_void from core. pub use core::ffi::c_void; -use Option; +use crate::prelude::*; pub type c_schar = i8; diff --git a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs index c823076e21f58..b5e72084d5aa1 100644 --- a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs @@ -26,7 +26,7 @@ s_no_extra_traits! { } } -pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; +pub(crate) const _ALIGNBYTES: usize = mem::size_of::() - 1; pub const PT_GETREGS: c_int = PT_FIRSTMACH + 0; pub const PT_SETREGS: c_int = PT_FIRSTMACH + 1; diff --git a/src/unix/bsd/netbsdlike/openbsd/arm.rs b/src/unix/bsd/netbsdlike/openbsd/arm.rs index 11305470d87be..1e66ed247a2eb 100644 --- a/src/unix/bsd/netbsdlike/openbsd/arm.rs +++ b/src/unix/bsd/netbsdlike/openbsd/arm.rs @@ -4,6 +4,6 @@ pub type c_long = i32; pub type c_ulong = u32; pub type c_char = u8; -pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; +pub(crate) const _ALIGNBYTES: usize = mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs b/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs index 977eb840c90a8..cb808719fb8ea 100644 --- a/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs @@ -1,3 +1,5 @@ +use crate::prelude::*; + pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 748dc2f1d715b..db854dd6300ea 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -82,8 +82,7 @@ s_no_extra_traits! { pub struct sockaddr_storage { pub ss_family: crate::sa_family_t, - __ss_padding: - [u8; 128 - crate::mem::size_of::() - crate::mem::size_of::()], + __ss_padding: [u8; 128 - mem::size_of::() - mem::size_of::()], __ss_align: c_ulong, } }