|
1 | | -error: expected one of: `crate`, `dict`, `eq`, `eq_int`, `extends`, `freelist`, `frozen`, `get_all`, `hash`, `immutable_type`, `mapping`, `module`, `name`, `ord`, `rename_all`, `sequence`, `set_all`, `str`, `subclass`, `unsendable`, `weakref`, `generic`, `skip_from_py_object` |
| 1 | +error: expected one of: `crate`, `dict`, `eq`, `eq_int`, `extends`, `freelist`, `frozen`, `get_all`, `hash`, `immutable_type`, `mapping`, `module`, `name`, `ord`, `rename_all`, `sequence`, `set_all`, `str`, `subclass`, `unsendable`, `weakref`, `generic`, `from_py_object`, `skip_from_py_object` |
2 | 2 | --> tests/ui/invalid_pyclass_args.rs:4:11 |
3 | 3 | | |
4 | 4 | 4 | #[pyclass(extend=pyo3::types::PyDict)] |
@@ -46,7 +46,7 @@ error: expected string literal |
46 | 46 | 25 | #[pyclass(module = my_module)] |
47 | 47 | | ^^^^^^^^^ |
48 | 48 |
|
49 | | -error: expected one of: `crate`, `dict`, `eq`, `eq_int`, `extends`, `freelist`, `frozen`, `get_all`, `hash`, `immutable_type`, `mapping`, `module`, `name`, `ord`, `rename_all`, `sequence`, `set_all`, `str`, `subclass`, `unsendable`, `weakref`, `generic`, `skip_from_py_object` |
| 49 | +error: expected one of: `crate`, `dict`, `eq`, `eq_int`, `extends`, `freelist`, `frozen`, `get_all`, `hash`, `immutable_type`, `mapping`, `module`, `name`, `ord`, `rename_all`, `sequence`, `set_all`, `str`, `subclass`, `unsendable`, `weakref`, `generic`, `from_py_object`, `skip_from_py_object` |
50 | 50 | --> tests/ui/invalid_pyclass_args.rs:28:11 |
51 | 51 | | |
52 | 52 | 28 | #[pyclass(weakrev)] |
@@ -162,6 +162,25 @@ error: The format string syntax cannot be used with enums |
162 | 162 | 171 | #[pyclass(eq, str = "Stuff...")] |
163 | 163 | | ^^^^^^^^^^ |
164 | 164 |
|
| 165 | +error: `skip_from_py_object` and `from_py_object` are mutually exclusive |
| 166 | + --> tests/ui/invalid_pyclass_args.rs:184:27 |
| 167 | + | |
| 168 | +184 | #[pyclass(from_py_object, skip_from_py_object)] |
| 169 | + | ^^^^^^^^^^^^^^^^^^^ |
| 170 | + |
| 171 | +error[E0277]: the trait bound `StructFromPyObjectNoClone: Clone` is not satisfied |
| 172 | + --> tests/ui/invalid_pyclass_args.rs:190:11 |
| 173 | + | |
| 174 | +190 | #[pyclass(from_py_object)] |
| 175 | + | ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `StructFromPyObjectNoClone` |
| 176 | + | |
| 177 | + = help: see issue #48214 |
| 178 | +help: consider annotating `StructFromPyObjectNoClone` with `#[derive(Clone)]` |
| 179 | + | |
| 180 | +191 + #[derive(Clone)] |
| 181 | +192 | struct StructFromPyObjectNoClone { |
| 182 | + | |
| 183 | + |
165 | 184 | error[E0592]: duplicate definitions with name `__pymethod___richcmp____` |
166 | 185 | --> tests/ui/invalid_pyclass_args.rs:37:1 |
167 | 186 | | |
|
0 commit comments