Skip to content

Commit 6970b3f

Browse files
committed
fixup: more tests/ui rere-ing
1 parent b6c2625 commit 6970b3f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/ui/invalid_pyfunction_argument.stderr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ error[E0277]: `Foo` cannot be used as a Python function argument
7070
--> tests/ui/invalid_pyfunction_argument.rs:14:59
7171
|
7272
14 | fn skip_from_py_object_without_custom_from_py_object(arg: Foo) {
73-
| ^^^ the trait `ExtractPyClassWithClone` is not implemented for `Foo`
73+
| ^^^ unsatisfied trait bound
7474
|
75+
help: the trait `ExtractPyClassWithClone` is not implemented for `Foo`
76+
--> tests/ui/invalid_pyfunction_argument.rs:11:1
77+
|
78+
11 | struct Foo;
79+
| ^^^^^^^^^^
7580
= note: implement `FromPyObject` to enable using `Foo` as a function argument
7681
= note: `Python<'py>` is also a valid argument type to pass the Python token into `#[pyfunction]`s and `#[pymethods]`
7782
= help: the following other types implement trait `PyFunctionArgument<'a, 'holder, 'py, IMPLEMENTS_FROMPYOBJECT>`:

tests/ui/missing_intopy.stderr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ error[E0277]: `Blah` cannot be converted to a Python object
22
--> tests/ui/missing_intopy.rs:4:14
33
|
44
4 | fn blah() -> Blah {
5-
| ^^^^ the trait `IntoPyObject<'_>` is not implemented for `Blah`
5+
| ^^^^ unsatisfied trait bound
66
|
7+
help: the trait `IntoPyObject<'_>` is not implemented for `Blah`
8+
--> tests/ui/missing_intopy.rs:1:1
9+
|
10+
1 | struct Blah;
11+
| ^^^^^^^^^^^
712
= note: `IntoPyObject` is automatically implemented by the `#[pyclass]` macro
813
= note: if you do not wish to have a corresponding Python type, implement it manually
914
= note: if you do not own `Blah` you can perform a manual conversion to one of the types in `pyo3::types::*`

0 commit comments

Comments
 (0)