From a45f9ac09219d70ea65c5b40d04beb5d45eec984 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Sun, 24 May 2026 21:12:05 +0200 Subject: [PATCH] fix broken ui tests --- tests/test_compile_error.rs | 5 ----- tests/ui/forbid_unsafe.rs | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_compile_error.rs b/tests/test_compile_error.rs index 02efeea78d2..9ae183f8352 100644 --- a/tests/test_compile_error.rs +++ b/tests/test_compile_error.rs @@ -38,10 +38,6 @@ fn test_compile_errors() { t.compile_fail("tests/ui/reject_generics.rs"); t.compile_fail("tests/ui/invalid_closure.rs"); t.compile_fail("tests/ui/pyclass_send.rs"); - #[cfg(not(feature = "experimental-inspect"))] - t.compile_fail("tests/ui/invalid_annotation.rs"); - #[cfg(not(feature = "experimental-inspect"))] - t.compile_fail("tests/ui/invalid_annotation_return.rs"); t.compile_fail("tests/ui/invalid_argument_attributes.rs"); t.compile_fail("tests/ui/invalid_intopy_derive.rs"); #[cfg(not(windows))] @@ -78,7 +74,6 @@ fn test_compile_errors() { #[cfg(any(not(Py_LIMITED_API), Py_3_10))] // to avoid PyFunctionArgument for &str t.compile_fail("tests/ui/invalid_cancel_handle.rs"); t.pass("tests/ui/pymodule_missing_docs.rs"); - #[cfg(not(any(Py_LIMITED_API, feature = "experimental-inspect")))] t.pass("tests/ui/forbid_unsafe.rs"); #[cfg(all(Py_LIMITED_API, not(Py_3_12), feature = "experimental-async"))] // output changes with async feature diff --git a/tests/ui/forbid_unsafe.rs b/tests/ui/forbid_unsafe.rs index 356326e65d3..715dc0d6236 100644 --- a/tests/ui/forbid_unsafe.rs +++ b/tests/ui/forbid_unsafe.rs @@ -1,6 +1,8 @@ #![forbid(unsafe_code)] #![forbid(unsafe_op_in_unsafe_fn)] +extern crate alloc; + use pyo3::*; #[expect(unexpected_cfgs)]