pyo3/tests/ui/invalid_macro_args.stderr
Ashley Anderson bf26daec2d
Positional-only args (#1925)
* Add support for positional-only args

* Update changelog. Add a few more tests. Run rust-fmt.

* Fix test.

* Fix tests again.

* Update CHANGELOG.md to link PR instead of issue

* Update guide to mention positional-only params

* Add unreachable!() per code review

* Update and expand tests for pos args.

* Fix tests, lint, add UI tests.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-10-19 23:13:27 +01:00

36 lines
1.1 KiB
Plaintext

error: positional argument or varargs(*) not allowed after keyword arguments
--> tests/ui/invalid_macro_args.rs:3:21
|
3 | #[pyfunction(a = 5, b)]
| ^
error: keyword argument or kwargs(**) is not allowed after kwargs(**)
--> tests/ui/invalid_macro_args.rs:8:29
|
8 | #[pyfunction(kwargs = "**", a = 5)]
| ^
error: / is not allowed after /, varargs(*), or kwargs(**)
--> tests/ui/invalid_macro_args.rs:13:25
|
13 | #[pyfunction(a, "*", b, "/", c)]
| ^^^
error: / is not allowed after /, varargs(*), or kwargs(**)
--> tests/ui/invalid_macro_args.rs:18:27
|
18 | #[pyfunction(a, args="*", "/", b)]
| ^^^
error: / is not allowed after /, varargs(*), or kwargs(**)
--> tests/ui/invalid_macro_args.rs:23:30
|
23 | #[pyfunction(a, kwargs="**", "/", b)]
| ^^^
error: * is not allowed after varargs(*) or kwargs(**)
--> tests/ui/invalid_macro_args.rs:28:29
|
28 | #[pyfunction(kwargs = "**", "*", a)]
| ^^^