Skip to content

Commit f4dd5d4

Browse files
JRRudy1davidhewitt
authored andcommitted
Feature-gated the crate-level deny(missing_debug_implementations) attribute.
This is necessary since the `pyo3::pyobject_native_type_base` macro only implements `Debug` with the "gil-refs" feature since the 0.22.0 update. The `Debug` impls are no longer relevant anyway because `&PyArray`, `&PyArrayDescr`, etc. can only be obtained through the gil-refs API's.
1 parent 199fcc5 commit f4dd5d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ as well as the [`PyReadonlyArray::try_as_matrix`] and [`PyReadwriteArray::try_as
6969
//!
7070
//! [c-api]: https://numpy.org/doc/stable/reference/c-api
7171
//! [ndarray]: https://numpy.org/doc/stable/reference/arrays.ndarray.html
72-
73-
#![deny(missing_docs, missing_debug_implementations)]
72+
#![deny(missing_docs)]
73+
// requiring `Debug` impls is not relevant without gil-refs since `&PyArray` and
74+
// similar aren't constructible and the `pyo3::pyobject_native_type_base` macro
75+
// does not provide a `Debug` impl
76+
#![cfg_attr(feature = "gil-refs", deny(missing_debug_implementations))]
7477

7578
#[cfg(all(target_os = "windows", target_arch = "x86"))]
7679
compile_error!("Compilation for 32-bit windows is not currently supported. See https://github.com/PyO3/rust-numpy/issues/448");

0 commit comments

Comments
 (0)