ci: updates for Rust 1.76

This commit is contained in:
David Hewitt 2024-02-22 09:02:52 +00:00
parent 3447f0e77d
commit 2d5a54e4d2
5 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
#[derive(crate::FromPyObject)] #[derive(crate::FromPyObject)]
#[pyo3(crate = "crate")] #[pyo3(crate = "crate")]
struct Derive1(i32); // newtype case struct Derive1(#[allow(dead_code)] i32); // newtype case
#[derive(crate::FromPyObject)] #[derive(crate::FromPyObject)]
#[pyo3(crate = "crate")] #[pyo3(crate = "crate")]

View File

@ -421,7 +421,7 @@ TypeError: failed to extract enum Foo ('TupleVar | StructVar | TransparentTuple
#[derive(Debug, FromPyObject)] #[derive(Debug, FromPyObject)]
enum EnumWithCatchAll<'a> { enum EnumWithCatchAll<'a> {
#[pyo3(transparent)] #[pyo3(transparent)]
Foo(Foo<'a>), Foo(#[allow(dead_code)] Foo<'a>),
#[pyo3(transparent)] #[pyo3(transparent)]
CatchAll(&'a PyAny), CatchAll(&'a PyAny),
} }

View File

@ -264,13 +264,13 @@ impl Sequence {
self.values.len() self.values.len()
} }
fn __getitem__(&self, index: SequenceIndex<'_>) -> PyResult<PyObject> { fn __getitem__(&self, py: Python<'_>, index: SequenceIndex<'_>) -> PyResult<PyObject> {
match index { match index {
SequenceIndex::Integer(index) => { SequenceIndex::Integer(index) => {
let uindex = self.usize_index(index)?; let uindex = self.usize_index(index)?;
self.values self.values
.get(uindex) .get(uindex)
.map(Clone::clone) .map(|o| o.clone_ref(py))
.ok_or_else(|| PyIndexError::new_err(index)) .ok_or_else(|| PyIndexError::new_err(index))
} }
// Just to prove that slicing can be implemented // Just to prove that slicing can be implemented

View File

@ -7,23 +7,23 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safe
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>` = help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
note: required because it appears within the type `PhantomData<*mut Python<'static>>` note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
--> $RUST/core/src/marker.rs --> $RUST/core/src/marker.rs
| |
| pub struct PhantomData<T: ?Sized>; | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^ | ^^^^^^^^^^^
note: required because it appears within the type `NotSend` note: required because it appears within the type `impl_::not_send::NotSend`
--> src/impl_/not_send.rs --> src/impl_/not_send.rs
| |
| pub(crate) struct NotSend(PhantomData<*mut Python<'static>>); | pub(crate) struct NotSend(PhantomData<*mut Python<'static>>);
| ^^^^^^^ | ^^^^^^^
= note: required because it appears within the type `(&GILGuard, NotSend)` = note: required because it appears within the type `(&pyo3::gil::GILGuard, impl_::not_send::NotSend)`
note: required because it appears within the type `PhantomData<(&GILGuard, NotSend)>` note: required because it appears within the type `PhantomData<(&pyo3::gil::GILGuard, impl_::not_send::NotSend)>`
--> $RUST/core/src/marker.rs --> $RUST/core/src/marker.rs
| |
| pub struct PhantomData<T: ?Sized>; | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^ | ^^^^^^^^^^^
note: required because it appears within the type `Python<'_>` note: required because it appears within the type `pyo3::Python<'_>`
--> src/marker.rs --> src/marker.rs
| |
| pub struct Python<'py>(PhantomData<(&'py GILGuard, NotSend)>); | pub struct Python<'py>(PhantomData<(&'py GILGuard, NotSend)>);

View File

@ -15,7 +15,7 @@ error[E0308]: mismatched types
| |___________________^ expected fn pointer, found fn item | |___________________^ expected fn pointer, found fn item
| |
= note: expected fn pointer `for<'a, 'b> fn(&'a TraverseTriesToTakePyRef, PyVisit<'b>) -> Result<(), PyTraverseError>` = note: expected fn pointer `for<'a, 'b> fn(&'a TraverseTriesToTakePyRef, PyVisit<'b>) -> Result<(), PyTraverseError>`
found fn item `for<'a, 'b> fn(pyo3::PyRef<'a, TraverseTriesToTakePyRef>, PyVisit<'b>) {TraverseTriesToTakePyRef::__traverse__}` found fn item `for<'a, 'b> fn(pyo3::PyRef<'a, TraverseTriesToTakePyRef, >, PyVisit<'b>) {TraverseTriesToTakePyRef::__traverse__}`
note: function defined here note: function defined here
--> src/impl_/pymethods.rs --> src/impl_/pymethods.rs
| |