|
| 1 | +error[E0277]: the trait bound `ComplexEnum: serde::Serialize` is not satisfied |
| 2 | + --> tests/trybuild/fail/complex_enum_without_json.rs:4:10 |
| 3 | + | |
| 4 | +4 | #[derive(FieldType)] |
| 5 | + | ^^^^^^^^^ unsatisfied trait bound |
| 6 | + | |
| 7 | +help: the trait `Serialize` is not implemented for `ComplexEnum` |
| 8 | + --> tests/trybuild/fail/complex_enum_without_json.rs:5:1 |
| 9 | + | |
| 10 | +5 | pub enum ComplexEnum { |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 12 | + = note: for local types consider adding `#[derive(serde::Serialize)]` to your `ComplexEnum` type |
| 13 | + = note: for types from other crates check whether the crate offers a `serde` feature flag |
| 14 | + = help: the following other types implement trait `Serialize`: |
| 15 | + &'a T |
| 16 | + &'a mut T |
| 17 | + () |
| 18 | + (T,) |
| 19 | + (T0, T1) |
| 20 | + (T0, T1, T2) |
| 21 | + (T0, T1, T2, T3) |
| 22 | + (T0, T1, T2, T3, T4) |
| 23 | + and $N others |
| 24 | + = note: required for `&ComplexEnum` to implement `Serialize` |
| 25 | +note: required by a bound in `to_value` |
| 26 | + --> $CARGO/serde_json-$VERSION/src/value/mod.rs |
| 27 | + | |
| 28 | + | pub fn to_value<T>(value: T) -> Result<Value, Error> |
| 29 | + | -------- required by a bound in this function |
| 30 | + | where |
| 31 | + | T: Serialize, |
| 32 | + | ^^^^^^^^^ required by this bound in `to_value` |
| 33 | + = note: this error originates in the derive macro `FieldType` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 34 | + |
| 35 | +error[E0599]: no variant or associated item named `deserialize` found for enum `ComplexEnum` in the current scope |
| 36 | + --> tests/trybuild/fail/complex_enum_without_json.rs:4:10 |
| 37 | + | |
| 38 | +4 | #[derive(FieldType)] |
| 39 | + | ^^^^^^^^^ variant or associated item not found in `ComplexEnum` |
| 40 | +5 | pub enum ComplexEnum { |
| 41 | + | -------------------- variant or associated item `deserialize` not found for this enum |
| 42 | + | |
| 43 | + = help: items from traits can only be used if the trait is implemented and in scope |
| 44 | + = note: the following traits define an item `deserialize`, perhaps you need to implement one of them: |
| 45 | + candidate #1: `Deserialize` |
| 46 | + candidate #2: `DeserializeSeed` |
| 47 | + = note: this error originates in the derive macro `FieldType` (in Nightly builds, run with -Z macro-backtrace for more info) |
0 commit comments