From c70782724b89a1704708ea188443ac4b02a088bf Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:15:16 +0100 Subject: [PATCH] fix `clippy::wildcard_import` firing on `#[pyclass]` --- pyo3-macros-backend/src/pyclass.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyo3-macros-backend/src/pyclass.rs b/pyo3-macros-backend/src/pyclass.rs index 2dd4cbfab2e..0f50da95dc6 100644 --- a/pyo3-macros-backend/src/pyclass.rs +++ b/pyo3-macros-backend/src/pyclass.rs @@ -2322,11 +2322,11 @@ impl<'a> PyClassImplsBuilder<'a> { let assertions = if attr.options.unsendable.is_some() { TokenStream::new() } else { - quote_spanned! { - cls.span() => + let assert = quote_spanned! { cls.span() => assert_pyclass_sync::<#cls>(); }; + quote! { const _: () = { use #pyo3_path::impl_::pyclass::*; - assert_pyclass_sync::<#cls>(); + #assert }; } };