ci: fix nightly unused import warnings

This commit is contained in:
David Hewitt 2023-10-25 21:31:12 +01:00
parent de6162f533
commit 572a27d2d3
4 changed files with 7 additions and 1 deletions

View file

@ -1,2 +1,4 @@
#[cfg(Py_LIMITED_API)] // This header doesn't exist in CPython, but Include/cpython/code.h does. We add
// this here so that PyCodeObject has a definition under the limited API.
opaque_struct!(PyCodeObject); opaque_struct!(PyCodeObject);

View file

@ -262,6 +262,7 @@ pub use self::boolobject::*;
pub use self::bytearrayobject::*; pub use self::bytearrayobject::*;
pub use self::bytesobject::*; pub use self::bytesobject::*;
pub use self::ceval::*; pub use self::ceval::*;
#[cfg(Py_LIMITED_API)]
pub use self::code::*; pub use self::code::*;
pub use self::codecs::*; pub use self::codecs::*;
pub use self::compile::*; pub use self::compile::*;
@ -326,6 +327,7 @@ mod bytesobject;
// skipped cellobject.h // skipped cellobject.h
mod ceval; mod ceval;
// skipped classobject.h // skipped classobject.h
#[cfg(Py_LIMITED_API)]
mod code; mod code;
mod codecs; mod codecs;
mod compile; mod compile;

View file

@ -439,6 +439,7 @@ pub mod once_cell {
pub use crate::sync::{GILOnceCell, Interned}; pub use crate::sync::{GILOnceCell, Interned};
} }
#[allow(unused_imports)] // with no features enabled this module has no public exports
pub use crate::conversions::*; pub use crate::conversions::*;
#[cfg(feature = "macros")] #[cfg(feature = "macros")]

View file

@ -149,4 +149,5 @@ mod inner {
} }
} }
#[allow(unused_imports)] // some tests use just the macros and none of the other functionality
pub use inner::*; pub use inner::*;