diff --git a/changelog.d/9351-unused-c-int.md b/changelog.d/9351-unused-c-int.md new file mode 100644 index 0000000000..3828208339 --- /dev/null +++ b/changelog.d/9351-unused-c-int.md @@ -0,0 +1,3 @@ +The `warnings` gate is green again. Five test modules in `perry-runtime` still +imported `std::os::raw::c_int` after the code that used it was removed, which +fails a `-D warnings` build. diff --git a/crates/perry-runtime/src/native_abi.rs b/crates/perry-runtime/src/native_abi.rs index 3b197028ed..7f70874589 100644 --- a/crates/perry-runtime/src/native_abi.rs +++ b/crates/perry-runtime/src/native_abi.rs @@ -475,7 +475,6 @@ pub extern "C" fn js_native_abi_check_pod_object(value: f64) -> i64 { #[cfg(test)] mod tests { use super::*; - use std::os::raw::c_int; fn catch_runtime_throw(f: impl FnOnce()) -> bool { crate::exception::catch_js_throw(f).is_err() diff --git a/crates/perry-runtime/src/native_arena.rs b/crates/perry-runtime/src/native_arena.rs index d0f12e585e..567b719a50 100644 --- a/crates/perry-runtime/src/native_arena.rs +++ b/crates/perry-runtime/src/native_arena.rs @@ -472,7 +472,6 @@ pub(crate) unsafe fn finalize_native_pod_view_for_gc(view: *mut NativePodViewHea #[cfg(test)] mod tests { use super::*; - use std::os::raw::c_int; fn boxed_ptr(ptr: *const u8) -> f64 { f64::from_bits(crate::value::JSValue::pointer(ptr).bits()) diff --git a/crates/perry-runtime/src/native_handle.rs b/crates/perry-runtime/src/native_handle.rs index 1d0d31e887..8d4d0901ff 100644 --- a/crates/perry-runtime/src/native_handle.rs +++ b/crates/perry-runtime/src/native_handle.rs @@ -408,7 +408,6 @@ pub(crate) unsafe fn finalize_native_handle_for_gc(handle: *mut NativeHandleHead #[cfg(test)] mod tests { use super::*; - use std::os::raw::c_int; /// The teardown-diagnostics gate must block every thread except the /// recorded owner — the unrecorded arm waving workers through is exactly diff --git a/crates/perry-runtime/src/node_stream_tests.rs b/crates/perry-runtime/src/node_stream_tests.rs index 06c756bbad..19aa3f717a 100644 --- a/crates/perry-runtime/src/node_stream_tests.rs +++ b/crates/perry-runtime/src/node_stream_tests.rs @@ -3,7 +3,6 @@ use super::*; use std::cell::RefCell; -use std::os::raw::c_int; thread_local! { pub(super) static WRITE_CAPTURED: RefCell>> = const { RefCell::new(Vec::new()) }; diff --git a/crates/perry-runtime/src/object/tests.rs b/crates/perry-runtime/src/object/tests.rs index 37c23d7850..ec8b14aa3d 100644 --- a/crates/perry-runtime/src/object/tests.rs +++ b/crates/perry-runtime/src/object/tests.rs @@ -2,7 +2,6 @@ #![cfg(test)] use super::*; -use std::os::raw::c_int; #[test] fn call_method_depth_drop_is_idempotent_after_exception_restore() {