| 1 | struct StructWithGenericsDiff<'__daft, 'd: '__daft, 'e: '__daft, T: '__daft, U: '__daft> |
| 2 | where |
| 3 | T: daft::Diffable + 'd + ?Sized, |
| 4 | U: daft::Diffable + 'e + ?Sized, |
| 5 | { |
| 6 | b: <usize as ::daft::Diffable>::Diff<'__daft>, |
| 7 | c: <&'d T as ::daft::Diffable>::Diff<'__daft>, |
| 8 | d: <&'e U as ::daft::Diffable>::Diff<'__daft>, |
| 9 | } |
| 10 | impl<'__daft, 'd: '__daft, 'e: '__daft, T: '__daft, U: '__daft> ::core::fmt::Debug |
| 11 | for StructWithGenericsDiff<'__daft, 'd, 'e, T, U> |
| 12 | where |
| 13 | T: daft::Diffable + 'd + ?Sized, |
| 14 | U: daft::Diffable + 'e + ?Sized, |
| 15 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 16 | <&'d T as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 17 | <&'e U as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 18 | { |
| 19 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| 20 | f.debug_struct(stringify!(StructWithGenericsDiff)) |
| 21 | .field(stringify!(b), &self.b) |
| 22 | .field(stringify!(c), &self.c) |
| 23 | .field(stringify!(d), &self.d) |
| 24 | .finish() |
| 25 | } |
| 26 | } |
| 27 | impl<'__daft, 'd: '__daft, 'e: '__daft, T: '__daft, U: '__daft> ::core::cmp::PartialEq |
| 28 | for StructWithGenericsDiff<'__daft, 'd, 'e, T, U> |
| 29 | where |
| 30 | T: daft::Diffable + 'd + ?Sized, |
| 31 | U: daft::Diffable + 'e + ?Sized, |
| 32 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 33 | <&'d T as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 34 | <&'e U as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 35 | { |
| 36 | fn eq(&self, other: &Self) -> bool { |
| 37 | self.b == other.b && self.c == other.c && self.d == other.d |
| 38 | } |
| 39 | } |
| 40 | impl<'__daft, 'd: '__daft, 'e: '__daft, T: '__daft, U: '__daft> ::core::cmp::Eq |
| 41 | for StructWithGenericsDiff<'__daft, 'd, 'e, T, U> |
| 42 | where |
| 43 | T: daft::Diffable + 'd + ?Sized, |
| 44 | U: daft::Diffable + 'e + ?Sized, |
| 45 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 46 | <&'d T as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 47 | <&'e U as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 48 | {} |
| 49 | impl<'d, 'e, T, U> ::daft::Diffable for StructWithGenerics<'d, 'e, T, U> |
| 50 | where |
| 51 | T: daft::Diffable + 'd + ?Sized, |
| 52 | U: daft::Diffable + 'e + ?Sized, |
| 53 | { |
| 54 | type Diff<'__daft> = StructWithGenericsDiff<'__daft, 'd, 'e, T, U> |
| 55 | where |
| 56 | Self: '__daft; |
| 57 | fn diff<'__daft>( |
| 58 | &'__daft self, |
| 59 | other: &'__daft Self, |
| 60 | ) -> StructWithGenericsDiff<'__daft, 'd, 'e, T, U> { |
| 61 | Self::Diff { |
| 62 | b: ::daft::Diffable::diff(&self.b, &other.b), |
| 63 | c: ::daft::Diffable::diff(&self.c, &other.c), |
| 64 | d: ::daft::Diffable::diff(&self.d, &other.d), |
| 65 | } |
| 66 | } |
| 67 | } |