Skip to content

Commit eb14000

Browse files
author
Joseph Perez
committed
test: fix ui tests
1 parent 92bff8a commit eb14000

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/ui/invalid_pyfunctions.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ error: Python functions cannot have `impl Trait` arguments
1111
| ^^^^
1212

1313
error: wildcard argument names are not supported
14-
--> tests/ui/invalid_pyfunctions.rs:13:22
15-
|
16-
9 | fn wildcard_argument(_: i32) {}
17-
| ^
14+
--> tests/ui/invalid_pyfunctions.rs:10:22
15+
|
16+
10 | fn wildcard_argument(_: i32) {}
17+
| ^
1818

1919
error: destructuring in arguments is not supported
20-
--> tests/ui/invalid_pyfunctions.rs:16:26
20+
--> tests/ui/invalid_pyfunctions.rs:13:26
2121
|
22-
12 | fn destructured_argument((a, b): (i32, i32)) {}
22+
13 | fn destructured_argument((a, b): (i32, i32)) {}
2323
| ^^^^^^
2424

2525
error: required arguments after an `Option<_>` argument are ambiguous
2626
= help: add a `#[pyo3(signature)]` annotation on this function to unambiguously specify the default values for all optional parameters
27-
--> tests/ui/invalid_pyfunctions.rs:19:63
27+
--> tests/ui/invalid_pyfunctions.rs:16:63
2828
|
29-
15 | fn function_with_required_after_option(_opt: Option<i32>, _x: i32) {}
29+
16 | fn function_with_required_after_option(_opt: Option<i32>, _x: i32) {}
3030
| ^^^

tests/ui/invalid_pymethods.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,27 +154,27 @@ error: Python functions cannot have `impl Trait` arguments
154154
| ^^^^
155155

156156
error: `pass_module` cannot be used on Python methods
157-
--> tests/ui/invalid_pymethods.rs:171:12
157+
--> tests/ui/invalid_pymethods.rs:166:12
158158
|
159159
166 | #[pyo3(pass_module)]
160160
| ^^^^^^^^^^^
161161

162162
error: Python objects are shared, so 'self' cannot be moved out of the Python interpreter.
163163
Try `&self`, `&mut self, `slf: PyRef<'_, Self>` or `slf: PyRefMut<'_, Self>`.
164-
--> tests/ui/invalid_pymethods.rs:177:29
164+
--> tests/ui/invalid_pymethods.rs:172:29
165165
|
166166
172 | fn method_self_by_value(self) {}
167167
| ^^^^
168168

169169
error: macros cannot be used as items in `#[pymethods]` impl blocks
170170
= note: this was previously accepted and ignored
171-
--> tests/ui/invalid_pymethods.rs:212:5
171+
--> tests/ui/invalid_pymethods.rs:207:5
172172
|
173173
207 | macro_invocation!();
174174
| ^^^^^^^^^^^^^^^^
175175

176176
error[E0119]: conflicting implementations of trait `pyo3::impl_::pyclass::PyClassNewTextSignature<TwoNew>` for type `pyo3::impl_::pyclass::PyClassImplCollector<TwoNew>`
177-
--> tests/ui/invalid_pymethods.rs:182:1
177+
--> tests/ui/invalid_pymethods.rs:177:1
178178
|
179179
177 | #[pymethods]
180180
| ^^^^^^^^^^^^
@@ -185,7 +185,7 @@ error[E0119]: conflicting implementations of trait `pyo3::impl_::pyclass::PyClas
185185
= note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)
186186

187187
error[E0592]: duplicate definitions with name `__pymethod___new____`
188-
--> tests/ui/invalid_pymethods.rs:182:1
188+
--> tests/ui/invalid_pymethods.rs:177:1
189189
|
190190
177 | #[pymethods]
191191
| ^^^^^^^^^^^^
@@ -196,7 +196,7 @@ error[E0592]: duplicate definitions with name `__pymethod___new____`
196196
= note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)
197197

198198
error[E0592]: duplicate definitions with name `__pymethod_func__`
199-
--> tests/ui/invalid_pymethods.rs:197:1
199+
--> tests/ui/invalid_pymethods.rs:192:1
200200
|
201201
192 | #[pymethods]
202202
| ^^^^^^^^^^^^

0 commit comments

Comments
 (0)