diff --git a/tests/ui/invalid_pyclass_args.rs b/tests/ui/invalid_pyclass_args.rs index f74fa49d8de..cff4ab6e6a3 100644 --- a/tests/ui/invalid_pyclass_args.rs +++ b/tests/ui/invalid_pyclass_args.rs @@ -76,4 +76,13 @@ struct InvalidOrderedStruct { inner: i32 } +#[pyclass] +struct Example { + #[pyo3(foo)] + #[pyo3(blah)] + x: i32, + #[pyo3(pop)] + y: i32, +} + fn main() {} diff --git a/tests/ui/invalid_pyclass_args.stderr b/tests/ui/invalid_pyclass_args.stderr index 23d3c3bbc64..8263991fd22 100644 --- a/tests/ui/invalid_pyclass_args.stderr +++ b/tests/ui/invalid_pyclass_args.stderr @@ -82,6 +82,24 @@ error: The `ord` option requires the `eq` option. 74 | #[pyclass(ord)] | ^^^ +error: expected one of: `get`, `set`, `name` + --> tests/ui/invalid_pyclass_args.rs:81:12 + | +81 | #[pyo3(foo)] + | ^^^ + +error: expected one of: `get`, `set`, `name` + --> tests/ui/invalid_pyclass_args.rs:82:12 + | +82 | #[pyo3(blah)] + | ^^^^ + +error: expected one of: `get`, `set`, `name` + --> tests/ui/invalid_pyclass_args.rs:84:12 + | +84 | #[pyo3(pop)] + | ^^^ + error[E0592]: duplicate definitions with name `__pymethod___richcmp____` --> tests/ui/invalid_pyclass_args.rs:36:1 |