|
| 1 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 2 | + --> tests/ui/invalid_intopy_derive.rs:4:11 |
| 3 | + | |
| 4 | +4 | struct Foo(); |
| 5 | + | ^^ |
| 6 | + |
| 7 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 8 | + --> tests/ui/invalid_intopy_derive.rs:7:13 |
| 9 | + | |
| 10 | +7 | struct Foo2 {} |
| 11 | + | ^^ |
| 12 | + |
| 13 | +error: cannot derive `IntoPyObject` for empty enum |
| 14 | + --> tests/ui/invalid_intopy_derive.rs:10:6 |
| 15 | + | |
| 16 | +10 | enum EmptyEnum {} |
| 17 | + | ^^^^^^^^^ |
| 18 | + |
| 19 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 20 | + --> tests/ui/invalid_intopy_derive.rs:14:15 |
| 21 | + | |
| 22 | +14 | EmptyTuple(), |
| 23 | + | ^^ |
| 24 | + |
| 25 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 26 | + --> tests/ui/invalid_intopy_derive.rs:20:17 |
| 27 | + | |
| 28 | +20 | EmptyStruct {}, |
| 29 | + | ^^ |
| 30 | + |
| 31 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 32 | + --> tests/ui/invalid_intopy_derive.rs:26:27 |
| 33 | + | |
| 34 | +26 | struct EmptyTransparentTup(); |
| 35 | + | ^^ |
| 36 | + |
| 37 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 38 | + --> tests/ui/invalid_intopy_derive.rs:30:31 |
| 39 | + | |
| 40 | +30 | struct EmptyTransparentStruct {} |
| 41 | + | ^^ |
| 42 | + |
| 43 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 44 | + --> tests/ui/invalid_intopy_derive.rs:35:15 |
| 45 | + | |
| 46 | +35 | EmptyTuple(), |
| 47 | + | ^^ |
| 48 | + |
| 49 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 50 | + --> tests/ui/invalid_intopy_derive.rs:42:17 |
| 51 | + | |
| 52 | +42 | EmptyStruct {}, |
| 53 | + | ^^ |
| 54 | + |
| 55 | +error: transparent structs and variants can only have 1 field |
| 56 | + --> tests/ui/invalid_intopy_derive.rs:48:35 |
| 57 | + | |
| 58 | +48 | struct TransparentTupTooManyFields(String, String); |
| 59 | + | ^^^^^^^^^^^^^^^^ |
| 60 | + |
| 61 | +error: transparent structs and variants can only have 1 field |
| 62 | + --> tests/ui/invalid_intopy_derive.rs:52:39 |
| 63 | + | |
| 64 | +52 | struct TransparentStructTooManyFields { |
| 65 | + | _______________________________________^ |
| 66 | +53 | | foo: String, |
| 67 | +54 | | bar: String, |
| 68 | +55 | | } |
| 69 | + | |_^ |
| 70 | + |
| 71 | +error: transparent structs and variants can only have 1 field |
| 72 | + --> tests/ui/invalid_intopy_derive.rs:60:15 |
| 73 | + | |
| 74 | +60 | EmptyTuple(String, String), |
| 75 | + | ^^^^^^^^^^^^^^^^ |
| 76 | + |
| 77 | +error: transparent structs and variants can only have 1 field |
| 78 | + --> tests/ui/invalid_intopy_derive.rs:67:17 |
| 79 | + | |
| 80 | +67 | EmptyStruct { |
| 81 | + | _________________^ |
| 82 | +68 | | foo: String, |
| 83 | +69 | | bar: String, |
| 84 | +70 | | }, |
| 85 | + | |_____^ |
| 86 | + |
| 87 | +error: expected `transparent` or `crate` |
| 88 | + --> tests/ui/invalid_intopy_derive.rs:75:8 |
| 89 | + | |
| 90 | +75 | #[pyo3(unknown = "should not work")] |
| 91 | + | ^^^^^^^ |
| 92 | + |
| 93 | +error: #[derive(`IntoPyObject`)] is not supported for unions |
| 94 | + --> tests/ui/invalid_intopy_derive.rs:81:1 |
| 95 | + | |
| 96 | +81 | union Union { |
| 97 | + | ^^^^^ |
| 98 | + |
| 99 | +error: cannot derive `IntoPyObject` for empty structs and variants |
| 100 | + --> tests/ui/invalid_intopy_derive.rs:85:10 |
| 101 | + | |
| 102 | +85 | #[derive(IntoPyObject)] |
| 103 | + | ^^^^^^^^^^^^ |
| 104 | + | |
| 105 | + = note: this error originates in the derive macro `IntoPyObject` (in Nightly builds, run with -Z macro-backtrace for more info) |
0 commit comments