pyo3/tests/ui/invalid_pyclass_args.stderr

60 lines
2.0 KiB
Plaintext
Raw Normal View History

error: expected one of: `crate`, `dict`, `extends`, `freelist`, `frozen`, `get_all`, `mapping`, `module`, `name`, `rename_all`, `sequence`, `set_all`, `subclass`, `unsendable`, `weakref`
--> tests/ui/invalid_pyclass_args.rs:3:11
|
3 | #[pyclass(extend=pyo3::types::PyDict)]
| ^^^^^^
error: expected identifier
--> tests/ui/invalid_pyclass_args.rs:6:21
|
6 | #[pyclass(extends = "PyDict")]
| ^^^^^^^^
error: expected string literal
--> tests/ui/invalid_pyclass_args.rs:9:18
|
9 | #[pyclass(name = m::MyClass)]
| ^
error: expected a single identifier in double quotes
--> tests/ui/invalid_pyclass_args.rs:12:18
2020-12-12 09:50:25 +00:00
|
12 | #[pyclass(name = "Custom Name")]
| ^^^^^^^^^^^^^
error: expected string literal
--> tests/ui/invalid_pyclass_args.rs:15:18
2020-12-12 09:50:25 +00:00
|
15 | #[pyclass(name = CustomName)]
| ^^^^^^^^^^
error: expected string literal
--> tests/ui/invalid_pyclass_args.rs:18:24
|
18 | #[pyclass(rename_all = camelCase)]
| ^^^^^^^^^
error: expected a valid renaming rule, possible values are: "camelCase", "kebab-case", "lowercase", "PascalCase", "SCREAMING-KEBAB-CASE", "SCREAMING_SNAKE_CASE", "snake_case", "UPPERCASE"
--> tests/ui/invalid_pyclass_args.rs:21:24
|
21 | #[pyclass(rename_all = "Camel-Case")]
| ^^^^^^^^^^^^
error: expected string literal
--> tests/ui/invalid_pyclass_args.rs:24:20
|
24 | #[pyclass(module = my_module)]
| ^^^^^^^^^
error: expected one of: `crate`, `dict`, `extends`, `freelist`, `frozen`, `get_all`, `mapping`, `module`, `name`, `rename_all`, `sequence`, `set_all`, `subclass`, `unsendable`, `weakref`
--> tests/ui/invalid_pyclass_args.rs:27:11
|
27 | #[pyclass(weakrev)]
| ^^^^^^^
error: a `#[pyclass]` cannot be both a `mapping` and a `sequence`
--> tests/ui/invalid_pyclass_args.rs:31:8
|
31 | struct CannotBeMappingAndSequence {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^