Skip to content

Commit

Permalink
update test_compile_error ui test output
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed Jan 27, 2024
1 parent 7918815 commit 2e29b41
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 42 deletions.
18 changes: 1 addition & 17 deletions tests/ui/abi3_nativetype_inheritance.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@ error[E0277]: the trait bound `PyDict: PyClass` is not satisfied
|
= help: the following other types implement trait `PyClass`:
TestClass
pyo3::coroutine::Coroutine
Coroutine
= note: required for `PyDict` to implement `PyClassBaseType`
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `PyDict: PyClass` is not satisfied
--> tests/ui/abi3_nativetype_inheritance.rs:5:19
|
5 | #[pyclass(extends=PyDict)]
| ^^^^^^ the trait `PyClass` is not implemented for `PyDict`
|
= help: the following other types implement trait `PyClass`:
TestClass
pyo3::coroutine::Coroutine
= note: required for `PyDict` to implement `PyClassBaseType`
note: required by a bound in `PyClassImpl::BaseType`
--> src/impl_/pyclass.rs
|
| type BaseType: PyTypeInfo + PyClassBaseType;
| ^^^^^^^^^^^^^^^ required by this bound in `PyClassImpl::BaseType`
6 changes: 3 additions & 3 deletions tests/ui/invalid_argument_attributes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ error[E0277]: the trait bound `CancelHandle: PyClass` is not satisfied
41 | async fn missing_cancel_handle_attribute(_param: pyo3::coroutine::CancelHandle) {}
| ^^^^ the trait `PyClass` is not implemented for `CancelHandle`
|
= help: the trait `PyClass` is implemented for `pyo3::coroutine::Coroutine`
= help: the trait `PyClass` is implemented for `Coroutine`
= note: required for `CancelHandle` to implement `FromPyObject<'_>`
= note: required for `CancelHandle` to implement `PyFunctionArgument<'_, '_>`
note: required by a bound in `extract_argument`
Expand All @@ -93,8 +93,8 @@ error[E0277]: the trait bound `CancelHandle: Clone` is not satisfied
| ^^^^ the trait `Clone` is not implemented for `CancelHandle`
|
= help: the following other types implement trait `PyFunctionArgument<'a, 'py>`:
&'a pyo3::coroutine::Coroutine
&'a mut pyo3::coroutine::Coroutine
&'a Coroutine
&'a mut Coroutine
= note: required for `CancelHandle` to implement `FromPyObject<'_>`
= note: required for `CancelHandle` to implement `PyFunctionArgument<'_, '_>`
note: required by a bound in `extract_argument`
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/invalid_result_conversion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ error[E0277]: the trait bound `PyErr: From<MyError>` is not satisfied
| ^^^^^^^^^^^^^ the trait `From<MyError>` is not implemented for `PyErr`
|
= help: the following other types implement trait `From<T>`:
<PyErr as From<PyBorrowError>>
<PyErr as From<std::io::Error>>
<PyErr as From<PyBorrowError>>
<PyErr as From<PyBorrowMutError>>
<PyErr as From<PyDowncastError<'a>>>
<PyErr as From<DowncastError<'_, '_>>>
Expand Down
21 changes: 0 additions & 21 deletions tests/ui/pyclass_send.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,3 @@ note: required by a bound in `SendablePyClass`
| 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)

error[E0277]: `Rc<i32>` cannot be sent between threads safely
--> tests/ui/pyclass_send.rs:4:1
|
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>`
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`
--> src/impl_/pyclass.rs
|
| 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)

0 comments on commit 2e29b41

Please sign in to comment.