Skip to content

Commit 284d6ee

Browse files
committed
ci: updates for Rust 1.76
1 parent 482883a commit 284d6ee

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/tests/hygiene/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#[derive(crate::FromPyObject)]
44
#[pyo3(crate = "crate")]
5-
struct Derive1(i32); // newtype case
5+
struct Derive1(#[allow(dead_code)] i32); // newtype case
66

77
#[derive(crate::FromPyObject)]
88
#[pyo3(crate = "crate")]

tests/test_frompyobject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ TypeError: failed to extract enum Foo ('TupleVar | StructVar | TransparentTuple
421421
#[derive(Debug, FromPyObject)]
422422
enum EnumWithCatchAll<'a> {
423423
#[pyo3(transparent)]
424-
Foo(Foo<'a>),
424+
Foo(#[allow(dead_code)] Foo<'a>),
425425
#[pyo3(transparent)]
426426
CatchAll(&'a PyAny),
427427
}

tests/test_proto_methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ impl Sequence {
264264
self.values.len()
265265
}
266266

267-
fn __getitem__(&self, index: SequenceIndex<'_>) -> PyResult<PyObject> {
267+
fn __getitem__(&self, py: Python<'_>, index: SequenceIndex<'_>) -> PyResult<PyObject> {
268268
match index {
269269
SequenceIndex::Integer(index) => {
270270
let uindex = self.usize_index(index)?;
271271
self.values
272272
.get(uindex)
273-
.map(Clone::clone)
273+
.map(|o| o.clone_ref(py))
274274
.ok_or_else(|| PyIndexError::new_err(index))
275275
}
276276
// Just to prove that slicing can be implemented

tests/ui/not_send.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safe
77
| required by a bound introduced by this call
88
|
99
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
10-
note: required because it appears within the type `PhantomData<*mut Python<'static>>`
10+
note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
1111
--> $RUST/core/src/marker.rs
1212
|
1313
| pub struct PhantomData<T: ?Sized>;
1414
| ^^^^^^^^^^^
15-
note: required because it appears within the type `NotSend`
15+
note: required because it appears within the type `impl_::not_send::NotSend`
1616
--> src/impl_/not_send.rs
1717
|
1818
| pub(crate) struct NotSend(PhantomData<*mut Python<'static>>);
1919
| ^^^^^^^
20-
= note: required because it appears within the type `(&GILGuard, NotSend)`
21-
note: required because it appears within the type `PhantomData<(&GILGuard, NotSend)>`
20+
= note: required because it appears within the type `(&pyo3::gil::GILGuard, impl_::not_send::NotSend)`
21+
note: required because it appears within the type `PhantomData<(&pyo3::gil::GILGuard, impl_::not_send::NotSend)>`
2222
--> $RUST/core/src/marker.rs
2323
|
2424
| pub struct PhantomData<T: ?Sized>;
2525
| ^^^^^^^^^^^
26-
note: required because it appears within the type `Python<'_>`
26+
note: required because it appears within the type `pyo3::Python<'_>`
2727
--> src/marker.rs
2828
|
2929
| pub struct Python<'py>(PhantomData<(&'py GILGuard, NotSend)>);

tests/ui/traverse.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ error[E0308]: mismatched types
1515
| |___________________^ expected fn pointer, found fn item
1616
|
1717
= note: expected fn pointer `for<'a, 'b> fn(&'a TraverseTriesToTakePyRef, PyVisit<'b>) -> Result<(), PyTraverseError>`
18-
found fn item `for<'a, 'b> fn(pyo3::PyRef<'a, TraverseTriesToTakePyRef>, PyVisit<'b>) {TraverseTriesToTakePyRef::__traverse__}`
18+
found fn item `for<'a, 'b> fn(pyo3::PyRef<'a, TraverseTriesToTakePyRef, >, PyVisit<'b>) {TraverseTriesToTakePyRef::__traverse__}`
1919
note: function defined here
2020
--> src/impl_/pymethods.rs
2121
|

0 commit comments

Comments
 (0)