Skip to content

Commit eef6d64

Browse files
ci: updates for Rust 1.93 (#5749)
1 parent c4c5b1e commit eef6d64

File tree

4 files changed

+94
-23
lines changed

4 files changed

+94
-23
lines changed

tests/ui/abi3_nativetype_inheritance.stderr

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ error[E0277]: pyclass `PyDict` cannot be subclassed
77
= help: the trait `PyClassBaseType` is not implemented for `PyDict`
88
= note: `PyDict` must have `#[pyclass(subclass)]` to be eligible for subclassing
99
= note: with the `abi3` feature enabled, PyO3 does not support subclassing native types
10-
= help: the trait `PyClassBaseType` is implemented for `PyAny`
10+
help: the trait `PyClassBaseType` is implemented for `PyAny`
11+
--> src/types/any.rs
12+
|
13+
| impl crate::impl_::pyclass::PyClassBaseType for PyAny {
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1115
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
1216

1317
error[E0277]: pyclass `PyDict` cannot be subclassed
@@ -19,7 +23,11 @@ error[E0277]: pyclass `PyDict` cannot be subclassed
1923
= help: the trait `PyClassBaseType` is not implemented for `PyDict`
2024
= note: `PyDict` must have `#[pyclass(subclass)]` to be eligible for subclassing
2125
= note: with the `abi3` feature enabled, PyO3 does not support subclassing native types
22-
= help: the trait `PyClassBaseType` is implemented for `PyAny`
26+
help: the trait `PyClassBaseType` is implemented for `PyAny`
27+
--> src/types/any.rs
28+
|
29+
| impl crate::impl_::pyclass::PyClassBaseType for PyAny {
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2331
note: required by a bound in `PyClassImpl::BaseType`
2432
--> src/impl_/pyclass.rs
2533
|

tests/ui/invalid_pyclass_init.stderr

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ error[E0277]: the trait bound `i32: IntoPyCallbackOutput<'_, i32>` is not satisf
44
8 | fn __init__(&self) -> i32 {
55
| ^^^ the trait `IntoPyCallbackOutput<'_, i32>` is not implemented for `i32`
66
|
7-
= help: the following other types implement trait `IntoPyCallbackOutput<'py, Target>`:
8-
`usize` implements `IntoPyCallbackOutput<'_, isize>`
9-
`usize` implements `IntoPyCallbackOutput<'_, usize>`
7+
help: the following other types implement trait `IntoPyCallbackOutput<'py, Target>`
8+
--> src/impl_/callback.rs
9+
|
10+
| impl IntoPyCallbackOutput<'_, ffi::Py_ssize_t> for usize {
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize` implements `IntoPyCallbackOutput<'_, isize>`
12+
...
13+
| impl IntoPyCallbackOutput<'_, usize> for usize {
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize` implements `IntoPyCallbackOutput<'_, usize>`

tests/ui/invalid_pyfunction_argument.stderr

Lines changed: 66 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ error[E0277]: `AtomicPtr<()>` cannot be used as a Python function argument
66
|
77
= note: implement `FromPyObject` to enable using `AtomicPtr<()>` as a function argument
88
= note: `Python<'py>` is also a valid argument type to pass the Python token into `#[pyfunction]`s and `#[pymethods]`
9-
= help: the trait `PyClass` is implemented for `Foo`
9+
help: the trait `PyClass` is implemented for `Foo`
10+
--> tests/ui/invalid_pyfunction_argument.rs:9:1
11+
|
12+
9 | #[pyclass(skip_from_py_object)]
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1014
= note: required for `AtomicPtr<()>` to implement `FromPyObject<'_, '_>`
1115
= note: required for `AtomicPtr<()>` to implement `PyFunctionArgument<'_, '_, '_, true>`
1216
note: required by a bound in `extract_argument`
@@ -17,6 +21,7 @@ note: required by a bound in `extract_argument`
1721
...
1822
| T: PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>,
1923
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `extract_argument`
24+
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
2025

2126
error[E0277]: `AtomicPtr<()>` cannot be used as a Python function argument
2227
--> tests/ui/invalid_pyfunction_argument.rs:5:37
@@ -26,11 +31,26 @@ error[E0277]: `AtomicPtr<()>` cannot be used as a Python function argument
2631
|
2732
= note: implement `FromPyObject` to enable using `AtomicPtr<()>` as a function argument
2833
= note: `Python<'py>` is also a valid argument type to pass the Python token into `#[pyfunction]`s and `#[pymethods]`
29-
= help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`:
30-
`&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
31-
`&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
32-
`&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
33-
`Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
34+
help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`
35+
--> src/impl_/extract_argument.rs
36+
|
37+
| / impl<'a, 'holder, 'py, T: 'a + 'py> PyFunctionArgument<'a, 'holder, 'py, false>
38+
| | for &'holder Bound<'py, T>
39+
| | where
40+
| | T: PyTypeCheck,
41+
| |___________________^ `&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
42+
...
43+
| / impl<'a, 'holder, 'py, T> PyFunctionArgument<'a, 'holder, 'py, false> for Option<T>
44+
| | where
45+
| | T: PyFunctionArgument<'a, 'holder, 'py, false>,
46+
| |___________________________________________________^ `Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
47+
...
48+
| impl<'a, 'holder, T: PyClass> PyFunctionArgument<'a, 'holder, '_, false> for &'holder T {
49+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
50+
...
51+
| / impl<'a, 'holder, T: PyClass<Frozen = False>> PyFunctionArgument<'a, 'holder, '_, false>
52+
| | for &'holder mut T
53+
| |______________________^ `&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
3454
= note: required for `AtomicPtr<()>` to implement `FromPyObject<'_, '_>`
3555
= note: required for `AtomicPtr<()>` to implement `PyFunctionArgument<'_, '_, '_, true>`
3656
note: required by a bound in `extract_argument`
@@ -50,11 +70,26 @@ error[E0277]: `AtomicPtr<()>` cannot be used as a Python function argument
5070
|
5171
= note: implement `FromPyObject` to enable using `AtomicPtr<()>` as a function argument
5272
= note: `Python<'py>` is also a valid argument type to pass the Python token into `#[pyfunction]`s and `#[pymethods]`
53-
= help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`:
54-
`&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
55-
`&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
56-
`&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
57-
`Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
73+
help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`
74+
--> src/impl_/extract_argument.rs
75+
|
76+
| / impl<'a, 'holder, 'py, T: 'a + 'py> PyFunctionArgument<'a, 'holder, 'py, false>
77+
| | for &'holder Bound<'py, T>
78+
| | where
79+
| | T: PyTypeCheck,
80+
| |___________________^ `&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
81+
...
82+
| / impl<'a, 'holder, 'py, T> PyFunctionArgument<'a, 'holder, 'py, false> for Option<T>
83+
| | where
84+
| | T: PyFunctionArgument<'a, 'holder, 'py, false>,
85+
| |___________________________________________________^ `Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
86+
...
87+
| impl<'a, 'holder, T: PyClass> PyFunctionArgument<'a, 'holder, '_, false> for &'holder T {
88+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
89+
...
90+
| / impl<'a, 'holder, T: PyClass<Frozen = False>> PyFunctionArgument<'a, 'holder, '_, false>
91+
| | for &'holder mut T
92+
| |______________________^ `&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
5893
= note: required for `AtomicPtr<()>` to implement `FromPyObject<'_, '_>`
5994
= note: required for `AtomicPtr<()>` to implement `PyFunctionArgument<'_, '_, '_, true>`
6095
note: required by a bound in `extract_argument`
@@ -79,11 +114,26 @@ help: the trait `ExtractPyClassWithClone` is not implemented for `Foo`
79114
| ^^^^^^^^^^
80115
= note: implement `FromPyObject` to enable using `Foo` as a function argument
81116
= note: `Python<'py>` is also a valid argument type to pass the Python token into `#[pyfunction]`s and `#[pymethods]`
82-
= help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`:
83-
`&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
84-
`&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
85-
`&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
86-
`Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
117+
help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`
118+
--> src/impl_/extract_argument.rs
119+
|
120+
| / impl<'a, 'holder, 'py, T: 'a + 'py> PyFunctionArgument<'a, 'holder, 'py, false>
121+
| | for &'holder Bound<'py, T>
122+
| | where
123+
| | T: PyTypeCheck,
124+
| |___________________^ `&'holder pyo3::Bound<'py, T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
125+
...
126+
| / impl<'a, 'holder, 'py, T> PyFunctionArgument<'a, 'holder, 'py, false> for Option<T>
127+
| | where
128+
| | T: PyFunctionArgument<'a, 'holder, 'py, false>,
129+
| |___________________________________________________^ `Option<T>` implements `PyFunctionArgument<'a, 'holder, 'py, false>`
130+
...
131+
| impl<'a, 'holder, T: PyClass> PyFunctionArgument<'a, 'holder, '_, false> for &'holder T {
132+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'holder T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
133+
...
134+
| / impl<'a, 'holder, T: PyClass<Frozen = False>> PyFunctionArgument<'a, 'holder, '_, false>
135+
| | for &'holder mut T
136+
| |______________________^ `&'holder mut T` implements `PyFunctionArgument<'a, 'holder, '_, false>`
87137
= note: required for `Foo` to implement `FromPyObject<'_, '_>`
88138
= note: required for `Foo` to implement `PyFunctionArgument<'_, '_, '_, true>`
89139
note: required by a bound in `extract_argument`

tests/ui/pyclass_send.stderr

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ error[E0277]: `*mut c_void` cannot be sent between threads safely
55
| ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
66
|
77
= help: within `NotSyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
8-
= help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
8+
help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
9+
--> src/impl_/pyclass.rs
10+
|
11+
| impl<T: Send> PyClassThreadChecker<T> for SendablePyClass<T> {
12+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
913
note: required because it appears within the type `NotSyncNotSend`
1014
--> tests/ui/pyclass_send.rs:5:8
1115
|
@@ -26,7 +30,11 @@ error[E0277]: `*mut c_void` cannot be sent between threads safely
2630
| ^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
2731
|
2832
= help: within `SyncNotSend`, the trait `Send` is not implemented for `*mut c_void`
29-
= help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
33+
help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
34+
--> src/impl_/pyclass.rs
35+
|
36+
| impl<T: Send> PyClassThreadChecker<T> for SendablePyClass<T> {
37+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3038
note: required because it appears within the type `SyncNotSend`
3139
--> tests/ui/pyclass_send.rs:12:8
3240
|

0 commit comments

Comments
 (0)