Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classify FIXMEs - 5.2 #4237

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ fn test_apple(target: &str) {
"os/clock.h",
"os/lock.h",
"os/signpost.h",
// FIXME: Requires the macOS 14.4 SDK.
// FIXME(macos): Requires the macOS 14.4 SDK.
//"os/os_sync_wait_on_address.h",
"poll.h",
"pthread.h",
Expand Down Expand Up @@ -325,15 +325,15 @@ fn test_apple(target: &str) {
return true;
}
match ty {
// FIXME: actually a union
// FIXME(union): actually a union
"sigval" => true,

// FIXME: The size is changed in recent macOSes.
// FIXME(macos): The size is changed in recent macOSes.
"malloc_zone_t" => true,
// it is a moving target, changing through versions
// also contains bitfields members
"tcp_connection_info" => true,
// FIXME: The size is changed in recent macOSes.
// FIXME(macos): The size is changed in recent macOSes.
"malloc_introspection_t" => true,
// sonoma changes the padding `rmx_filler` field.
"rt_metrics" => true,
Expand All @@ -347,10 +347,10 @@ fn test_apple(target: &str) {
return true;
}
match ty {
// FIXME: Requires the macOS 14.4 SDK.
// FIXME(macos): Requires the macOS 14.4 SDK.
"os_sync_wake_by_address_flags_t" | "os_sync_wait_on_address_flags_t" => true,

// FIXME: "'__uint128' undeclared" in C
// FIXME(macos): "'__uint128' undeclared" in C
"__uint128" => true,

_ => false,
Expand All @@ -362,13 +362,13 @@ fn test_apple(target: &str) {
// These OSX constants are removed in Sierra.
// https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html
"KERN_KDENABLE_BG_TRACE" | "KERN_KDDISABLE_BG_TRACE" => true,
// FIXME: the value has been changed since Catalina (0xffff0000 -> 0x3fff0000).
// FIXME(macos): the value has been changed since Catalina (0xffff0000 -> 0x3fff0000).
"SF_SETTABLE" => true,

// FIXME: XCode 13.1 doesn't have it.
// FIXME(macos): XCode 13.1 doesn't have it.
"TIOCREMOTE" => true,

// FIXME: Requires the macOS 14.4 SDK.
// FIXME(macos): Requires the macOS 14.4 SDK.
"OS_SYNC_WAKE_BY_ADDRESS_NONE"
| "OS_SYNC_WAKE_BY_ADDRESS_SHARED"
| "OS_SYNC_WAIT_ON_ADDRESS_NONE"
Expand All @@ -384,19 +384,19 @@ fn test_apple(target: &str) {
// close calls the close_nocancel system call
"close" => true,

// FIXME: std removed libresolv support: https://github.com/rust-lang/rust/pull/102766
// FIXME(1.0): std removed libresolv support: https://github.com/rust-lang/rust/pull/102766
"res_init" => true,

// FIXME: remove once the target in CI is updated
// FIXME(macos): remove once the target in CI is updated
"pthread_jit_write_freeze_callbacks_np" => true,

// FIXME: ABI has been changed on recent macOSes.
// FIXME(macos): ABI has been changed on recent macOSes.
"os_unfair_lock_assert_owner" | "os_unfair_lock_assert_not_owner" => true,

// FIXME: Once the SDK get updated to Ventura's level
// FIXME(macos): Once the SDK get updated to Ventura's level
"freadlink" | "mknodat" | "mkfifoat" => true,

// FIXME: Requires the macOS 14.4 SDK.
// FIXME(macos): Requires the macOS 14.4 SDK.
"os_sync_wake_by_address_any"
| "os_sync_wake_by_address_all"
| "os_sync_wake_by_address_flags_t"
Expand All @@ -411,7 +411,7 @@ fn test_apple(target: &str) {

cfg.skip_field(move |struct_, field| {
match (struct_, field) {
// FIXME: the array size has been changed since macOS 10.15 ([8] -> [7]).
// FIXME(macos): the array size has been changed since macOS 10.15 ([8] -> [7]).
("statfs", "f_reserved") => true,
("__darwin_arm_neon_state64", "__v") => true,

Expand All @@ -425,7 +425,7 @@ fn test_apple(target: &str) {

cfg.skip_field_type(move |struct_, field| {
match (struct_, field) {
// FIXME: actually a union
// FIXME(union): actually a union
("sigevent", "sigev_value") => true,
_ => false,
}
Expand Down Expand Up @@ -459,7 +459,7 @@ fn test_apple(target: &str) {
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
s.replace("e_nsec", "espec.tv_nsec")
}
// FIXME: sigaction actually contains a union with two variants:
// FIXME(macos): sigaction actually contains a union with two variants:
// a sa_sigaction with type: (*)(int, struct __siginfo *, void *)
// a sa_handler with type sig_t
"sa_sigaction" if struct_ == "sigaction" => "sa_handler".to_string(),
Expand All @@ -468,7 +468,7 @@ fn test_apple(target: &str) {
});

cfg.skip_roundtrip(move |s| match s {
// FIXME: this type has the wrong ABI
// FIXME(macos): this type has the wrong ABI
"max_align_t" if i686 => true,
// Can't return an array from a C function.
"uuid_t" | "vol_capabilities_set_t" => true,
Expand Down Expand Up @@ -575,7 +575,7 @@ fn test_openbsd(target: &str) {
return true;
}
match ty {
// FIXME: actually a union
// FIXME(union): actually a union
"sigval" => true,

_ => false,
Expand Down
36 changes: 18 additions & 18 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub type rlim_t = c_ulonglong;
pub type c_long = i64;
pub type c_ulong = u64;

// FIXME: why are these uninhabited types? that seems... wrong?
// FIXME(fuchsia): why are these uninhabited types? that seems... wrong?
// Presumably these should be `()` or an `extern type` (when that stabilizes).
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
Expand All @@ -111,7 +111,7 @@ impl Clone for DIR {
}

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos64_t {} // FIXME: fill this out with a struct
pub enum fpos64_t {} // FIXME(fuchsia): fill this out with a struct
impl Copy for fpos64_t {}
impl Clone for fpos64_t {
fn clone(&self) -> fpos64_t {
Expand Down Expand Up @@ -144,7 +144,7 @@ s! {
pub tv_nsec: c_long,
}

// FIXME: the rlimit and rusage related functions and types don't exist
// FIXME(fuchsia): the rlimit and rusage related functions and types don't exist
// within zircon. Are there reasons for keeping them around?
pub struct rlimit {
pub rlim_cur: rlim_t,
Expand Down Expand Up @@ -478,7 +478,7 @@ s! {
pub ifa_flags: c_uint,
pub ifa_addr: *mut crate::sockaddr,
pub ifa_netmask: *mut crate::sockaddr,
pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union
pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union
pub ifa_data: *mut c_void,
}

Expand Down Expand Up @@ -1097,7 +1097,7 @@ cfg_if! {
.field("totalhigh", &self.totalhigh)
.field("freehigh", &self.freehigh)
.field("mem_unit", &self.mem_unit)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down Expand Up @@ -1135,7 +1135,7 @@ cfg_if! {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("sockaddr_un")
.field("sun_family", &self.sun_family)
// FIXME: .field("sun_path", &self.sun_path)
// FIXME(debug): .field("sun_path", &self.sun_path)
.finish()
}
}
Expand Down Expand Up @@ -1163,7 +1163,7 @@ cfg_if! {
f.debug_struct("sockaddr_storage")
.field("ss_family", &self.ss_family)
.field("__ss_align", &self.__ss_align)
// FIXME: .field("__ss_pad2", &self.__ss_pad2)
// FIXME(debug): .field("__ss_pad2", &self.__ss_pad2)
.finish()
}
}
Expand Down Expand Up @@ -1207,11 +1207,11 @@ cfg_if! {
impl fmt::Debug for utsname {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("utsname")
// FIXME: .field("sysname", &self.sysname)
// FIXME: .field("nodename", &self.nodename)
// FIXME: .field("release", &self.release)
// FIXME: .field("version", &self.version)
// FIXME: .field("machine", &self.machine)
// FIXME(debug): .field("sysname", &self.sysname)
// FIXME(debug): .field("nodename", &self.nodename)
// FIXME(debug): .field("release", &self.release)
// FIXME(debug): .field("version", &self.version)
// FIXME(debug): .field("machine", &self.machine)
.finish()
}
}
Expand Down Expand Up @@ -1246,7 +1246,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -1281,7 +1281,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -1390,7 +1390,7 @@ cfg_if! {
impl fmt::Debug for pthread_cond_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_cond_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand All @@ -1409,7 +1409,7 @@ cfg_if! {
impl fmt::Debug for pthread_mutex_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_mutex_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand All @@ -1428,7 +1428,7 @@ cfg_if! {
impl fmt::Debug for pthread_rwlock_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_rwlock_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand Down Expand Up @@ -3562,7 +3562,7 @@ impl Clone for FILE {
}
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // FIXME: fill this out with a struct
pub enum fpos_t {} // FIXME(fuchsia): fill this out with a struct
impl Copy for fpos_t {}
impl Clone for fpos_t {
fn clone(&self) -> fpos_t {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
redundant_semicolons,
unused_macros,
unused_macro_rules,
// FIXME: temporarily allow dead_code to fix CI:
// FIXME(1.0): temporarily allow dead_code to fix CI:
// - https://github.com/rust-lang/libc/issues/3740
// - https://github.com/rust-lang/rust/pull/126456
dead_code,
Expand Down
6 changes: 3 additions & 3 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ pub const EAI_SERVICE: c_int = 9;
pub const EAI_SOCKTYPE: c_int = 10;
pub const EAI_SYSTEM: c_int = 11;

// FIXME: This is not defined in vxWorks, but we have to define it here
// FIXME(vxworks): This is not defined in vxWorks, but we have to define it here
// to make the building pass for getrandom and std
pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void;

Expand Down Expand Up @@ -733,7 +733,7 @@ pub const S_taskLib_TASK_HOOK_TABLE_FULL: c_int = taskErrorBase + 0x0066;
pub const S_taskLib_TASK_HOOK_NOT_FOUND: c_int = taskErrorBase + 0x0067;
pub const S_taskLib_ILLEGAL_PRIORITY: c_int = taskErrorBase + 0x0068;

// FIXME: could also be useful for TASK_DESC type
// FIXME(vxworks): could also be useful for TASK_DESC type
pub const VX_TASK_NAME_LENGTH: c_int = 31;

// semLibCommon.h
Expand Down Expand Up @@ -1077,7 +1077,7 @@ impl Clone for FILE {
}
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // FIXME: fill this out with a struct
pub enum fpos_t {} // FIXME(vxworks): fill this out with a struct
impl Copy for fpos_t {}
impl Clone for fpos_t {
fn clone(&self) -> fpos_t {
Expand Down