Skip to content

Commit

Permalink
ci: updates for Rust 1.77
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Mar 22, 2024
1 parent 870a4bb commit 8f1ab9e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tests/ui/invalid_pyfunctions.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ error[E0277]: the trait bound `&str: From<BoundRef<'_, '_, pyo3::prelude::PyModu
--> tests/ui/invalid_pyfunctions.rs:24:13
|
24 | string: &str,
| ^ the trait `From<BoundRef<'_, '_, pyo3::prelude::PyModule>>` is not implemented for `&str`
| ^ the trait `From<BoundRef<'_, '_, pyo3::prelude::PyModule>>` is not implemented for `&str`, which is required by `BoundRef<'_, '_, pyo3::prelude::PyModule>: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<String as From<char>>
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/invalid_pymethod_receiver.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ error[E0277]: the trait bound `i32: From<BoundRef<'_, '_, MyClass>>` is not sati
--> tests/ui/invalid_pymethod_receiver.rs:8:43
|
8 | fn method_with_invalid_self_type(slf: i32, py: Python<'_>, index: u32) {}
| ^^^ the trait `From<BoundRef<'_, '_, MyClass>>` is not implemented for `i32`
| ^^^ the trait `From<BoundRef<'_, '_, MyClass>>` is not implemented for `i32`, which is required by `i32: TryFrom<BoundRef<'_, '_, MyClass>>`
|
= help: the following other types implement trait `From<T>`:
<i32 as From<bool>>
<i32 as From<i8>>
<i32 as From<i16>>
<i32 as From<u8>>
<i32 as From<u16>>
<i32 as From<NonZeroI32>>
<i32 as From<NonZero<i32>>>
= note: required for `BoundRef<'_, '_, MyClass>` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<BoundRef<'_, '_, MyClass>>`
4 changes: 2 additions & 2 deletions tests/ui/invalid_pymethods.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ error[E0277]: the trait bound `i32: From<BoundRef<'_, '_, PyType>>` is not satis
--> tests/ui/invalid_pymethods.rs:46:45
|
46 | fn classmethod_wrong_first_argument(_x: i32) -> Self {
| ^^^ the trait `From<BoundRef<'_, '_, PyType>>` is not implemented for `i32`
| ^^^ the trait `From<BoundRef<'_, '_, PyType>>` is not implemented for `i32`, which is required by `BoundRef<'_, '_, PyType>: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<i32 as From<bool>>
<i32 as From<i8>>
<i32 as From<i16>>
<i32 as From<u8>>
<i32 as From<u16>>
<i32 as From<NonZeroI32>>
<i32 as From<NonZero<i32>>>
= note: required for `BoundRef<'_, '_, PyType>` to implement `Into<i32>`
2 changes: 1 addition & 1 deletion tests/ui/invalid_result_conversion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait bound `PyErr: From<MyError>` is not satisfied
--> tests/ui/invalid_result_conversion.rs:21:1
|
21 | #[pyfunction]
| ^^^^^^^^^^^^^ the trait `From<MyError>` is not implemented for `PyErr`
| ^^^^^^^^^^^^^ the trait `From<MyError>` is not implemented for `PyErr`, which is required by `MyError: Into<PyErr>`
|
= help: the following other types implement trait `From<T>`:
<PyErr as From<pyo3::Bound<'py, T>>>
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/missing_intopy.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait bound `Blah: IntoPy<Py<PyAny>>` is not satisfied
--> tests/ui/missing_intopy.rs:3:1
|
3 | #[pyo3::pyfunction]
| ^^^^^^^^^^^^^^^^^^^ the trait `IntoPy<Py<PyAny>>` is not implemented for `Blah`
| ^^^^^^^^^^^^^^^^^^^ the trait `IntoPy<Py<PyAny>>` is not implemented for `Blah`, which is required by `Blah: OkWrap<_>`
|
= help: the following other types implement trait `IntoPy<T>`:
<bool as IntoPy<Py<PyAny>>>
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/not_send.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safe
| |
| 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>`, which is required by `{closure@$DIR/tests/ui/not_send.rs:4:22: 4:24}: Ungil`
note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
--> $RUST/core/src/marker.rs
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/not_send2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safe
10 | | });
| |_________^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
= help: within `pyo3::Bound<'_, PyString>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
= help: within `pyo3::Bound<'_, PyString>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`, which is required by `{closure@$DIR/tests/ui/not_send2.rs:8:26: 8:28}: Ungil`
note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
--> $RUST/core/src/marker.rs
|
Expand Down
20 changes: 10 additions & 10 deletions tests/ui/pyclass_send.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ error[E0277]: `Rc<i32>` cannot be sent between threads safely
4 | #[pyclass]
| ^^^^^^^^^^ `Rc<i32>` cannot be sent between threads safely
|
= help: within `NotThreadSafe`, the trait `Send` is not implemented for `Rc<i32>`
= help: within `NotThreadSafe`, the trait `Send` is not implemented for `Rc<i32>`, which is required by `SendablePyClass<NotThreadSafe>: pyo3::impl_::pyclass::PyClassThreadChecker<NotThreadSafe>`
= help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
note: required because it appears within the type `NotThreadSafe`
--> tests/ui/pyclass_send.rs:5:8
|
5 | struct NotThreadSafe {
| ^^^^^^^^^^^^^
note: required by a bound in `SendablePyClass`
= note: required for `SendablePyClass<NotThreadSafe>` to implement `pyo3::impl_::pyclass::PyClassThreadChecker<NotThreadSafe>`
note: required by a bound in `PyClassImpl::ThreadChecker`
--> src/impl_/pyclass.rs
|
| pub struct SendablePyClass<T: Send>(PhantomData<T>);
| ^^^^ required by this bound in `SendablePyClass`
| type ThreadChecker: PyClassThreadChecker<Self>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PyClassImpl::ThreadChecker`
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `Rc<i32>` cannot be sent between threads safely
Expand All @@ -23,17 +25,15 @@ error[E0277]: `Rc<i32>` cannot be sent between threads safely
4 | #[pyclass]
| ^^^^^^^^^^ `Rc<i32>` cannot be sent between threads safely
|
= help: within `NotThreadSafe`, the trait `Send` is not implemented for `Rc<i32>`
= help: the trait `pyo3::impl_::pyclass::PyClassThreadChecker<T>` is implemented for `SendablePyClass<T>`
= help: within `NotThreadSafe`, the trait `Send` is not implemented for `Rc<i32>`, which is required by `NotThreadSafe: Send`
note: required because it appears within the type `NotThreadSafe`
--> tests/ui/pyclass_send.rs:5:8
|
5 | struct NotThreadSafe {
| ^^^^^^^^^^^^^
= note: required for `SendablePyClass<NotThreadSafe>` to implement `pyo3::impl_::pyclass::PyClassThreadChecker<NotThreadSafe>`
note: required by a bound in `PyClassImpl::ThreadChecker`
note: required by a bound in `SendablePyClass`
--> src/impl_/pyclass.rs
|
| type ThreadChecker: PyClassThreadChecker<Self>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PyClassImpl::ThreadChecker`
| pub struct SendablePyClass<T: Send>(PhantomData<T>);
| ^^^^ required by this bound in `SendablePyClass`
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

0 comments on commit 8f1ab9e

Please sign in to comment.