diff --git a/test_suite/tests/expand/derive/enum/de_enum.expanded.rs b/test_suite/tests/expand/derive/enum/de_enum.expanded.rs index 224a5468..d47c1406 100644 --- a/test_suite/tests/expand/derive/enum/de_enum.expanded.rs +++ b/test_suite/tests/expand/derive/enum/de_enum.expanded.rs @@ -7,213 +7,6 @@ enum DeEnum { _Seq2(i8, B, C, D), _Map2 { a: i8, b: B, c: C, d: D }, } -#[automatically_derived] -#[allow(unused_qualifications)] -impl ::core::fmt::Debug - for DeEnum -{ - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - match (&*self,) { - (&DeEnum::Unit,) => { - let mut debug_trait_builder = f.debug_tuple("Unit"); - debug_trait_builder.finish() - } - (&DeEnum::Seq(ref __self_0, ref __self_1, ref __self_2, ref __self_3),) => { - let mut debug_trait_builder = f.debug_tuple("Seq"); - let _ = debug_trait_builder.field(&&(*__self_0)); - let _ = debug_trait_builder.field(&&(*__self_1)); - let _ = debug_trait_builder.field(&&(*__self_2)); - let _ = debug_trait_builder.field(&&(*__self_3)); - debug_trait_builder.finish() - } - (&DeEnum::Map { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - },) => { - let mut debug_trait_builder = f.debug_struct("Map"); - let _ = debug_trait_builder.field("a", &&(*__self_0)); - let _ = debug_trait_builder.field("b", &&(*__self_1)); - let _ = debug_trait_builder.field("c", &&(*__self_2)); - let _ = debug_trait_builder.field("d", &&(*__self_3)); - debug_trait_builder.finish() - } - (&DeEnum::_Unit2,) => { - let mut debug_trait_builder = f.debug_tuple("_Unit2"); - debug_trait_builder.finish() - } - (&DeEnum::_Seq2(ref __self_0, ref __self_1, ref __self_2, ref __self_3),) => { - let mut debug_trait_builder = f.debug_tuple("_Seq2"); - let _ = debug_trait_builder.field(&&(*__self_0)); - let _ = debug_trait_builder.field(&&(*__self_1)); - let _ = debug_trait_builder.field(&&(*__self_2)); - let _ = debug_trait_builder.field(&&(*__self_3)); - debug_trait_builder.finish() - } - (&DeEnum::_Map2 { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - },) => { - let mut debug_trait_builder = f.debug_struct("_Map2"); - let _ = debug_trait_builder.field("a", &&(*__self_0)); - let _ = debug_trait_builder.field("b", &&(*__self_1)); - let _ = debug_trait_builder.field("c", &&(*__self_2)); - let _ = debug_trait_builder.field("d", &&(*__self_3)); - debug_trait_builder.finish() - } - } - } -} -impl ::core::marker::StructuralPartialEq for DeEnum {} -#[automatically_derived] -#[allow(unused_qualifications)] -impl - ::core::cmp::PartialEq for DeEnum -{ - #[inline] - fn eq(&self, other: &DeEnum) -> bool { - { - let __self_vi = unsafe { ::core::intrinsics::discriminant_value(&*self) } as isize; - let __arg_1_vi = unsafe { ::core::intrinsics::discriminant_value(&*other) } as isize; - if true && __self_vi == __arg_1_vi { - match (&*self, &*other) { - ( - &DeEnum::Seq(ref __self_0, ref __self_1, ref __self_2, ref __self_3), - &DeEnum::Seq(ref __arg_1_0, ref __arg_1_1, ref __arg_1_2, ref __arg_1_3), - ) => { - (*__self_0) == (*__arg_1_0) - && (*__self_1) == (*__arg_1_1) - && (*__self_2) == (*__arg_1_2) - && (*__self_3) == (*__arg_1_3) - } - ( - &DeEnum::Map { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - }, - &DeEnum::Map { - a: ref __arg_1_0, - b: ref __arg_1_1, - c: ref __arg_1_2, - d: ref __arg_1_3, - }, - ) => { - (*__self_0) == (*__arg_1_0) - && (*__self_1) == (*__arg_1_1) - && (*__self_2) == (*__arg_1_2) - && (*__self_3) == (*__arg_1_3) - } - ( - &DeEnum::_Seq2(ref __self_0, ref __self_1, ref __self_2, ref __self_3), - &DeEnum::_Seq2(ref __arg_1_0, ref __arg_1_1, ref __arg_1_2, ref __arg_1_3), - ) => { - (*__self_0) == (*__arg_1_0) - && (*__self_1) == (*__arg_1_1) - && (*__self_2) == (*__arg_1_2) - && (*__self_3) == (*__arg_1_3) - } - ( - &DeEnum::_Map2 { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - }, - &DeEnum::_Map2 { - a: ref __arg_1_0, - b: ref __arg_1_1, - c: ref __arg_1_2, - d: ref __arg_1_3, - }, - ) => { - (*__self_0) == (*__arg_1_0) - && (*__self_1) == (*__arg_1_1) - && (*__self_2) == (*__arg_1_2) - && (*__self_3) == (*__arg_1_3) - } - _ => true, - } - } else { - false - } - } - } - #[inline] - fn ne(&self, other: &DeEnum) -> bool { - { - let __self_vi = unsafe { ::core::intrinsics::discriminant_value(&*self) } as isize; - let __arg_1_vi = unsafe { ::core::intrinsics::discriminant_value(&*other) } as isize; - if true && __self_vi == __arg_1_vi { - match (&*self, &*other) { - ( - &DeEnum::Seq(ref __self_0, ref __self_1, ref __self_2, ref __self_3), - &DeEnum::Seq(ref __arg_1_0, ref __arg_1_1, ref __arg_1_2, ref __arg_1_3), - ) => { - (*__self_0) != (*__arg_1_0) - || (*__self_1) != (*__arg_1_1) - || (*__self_2) != (*__arg_1_2) - || (*__self_3) != (*__arg_1_3) - } - ( - &DeEnum::Map { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - }, - &DeEnum::Map { - a: ref __arg_1_0, - b: ref __arg_1_1, - c: ref __arg_1_2, - d: ref __arg_1_3, - }, - ) => { - (*__self_0) != (*__arg_1_0) - || (*__self_1) != (*__arg_1_1) - || (*__self_2) != (*__arg_1_2) - || (*__self_3) != (*__arg_1_3) - } - ( - &DeEnum::_Seq2(ref __self_0, ref __self_1, ref __self_2, ref __self_3), - &DeEnum::_Seq2(ref __arg_1_0, ref __arg_1_1, ref __arg_1_2, ref __arg_1_3), - ) => { - (*__self_0) != (*__arg_1_0) - || (*__self_1) != (*__arg_1_1) - || (*__self_2) != (*__arg_1_2) - || (*__self_3) != (*__arg_1_3) - } - ( - &DeEnum::_Map2 { - a: ref __self_0, - b: ref __self_1, - c: ref __self_2, - d: ref __self_3, - }, - &DeEnum::_Map2 { - a: ref __arg_1_0, - b: ref __arg_1_1, - c: ref __arg_1_2, - d: ref __arg_1_3, - }, - ) => { - (*__self_0) != (*__arg_1_0) - || (*__self_1) != (*__arg_1_1) - || (*__self_2) != (*__arg_1_2) - || (*__self_3) != (*__arg_1_3) - } - _ => false, - } - } else { - true - } - } - } -} #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] const _IMPL_DESERIALIZE_FOR_DeEnum: () = { #[allow(unknown_lints)] @@ -1370,4 +1163,4 @@ const _IMPL_DESERIALIZE_FOR_DeEnum: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/enum/de_enum.rs b/test_suite/tests/expand/derive/enum/de_enum.rs index 59c3bb63..642ea328 100644 --- a/test_suite/tests/expand/derive/enum/de_enum.rs +++ b/test_suite/tests/expand/derive/enum/de_enum.rs @@ -1,6 +1,6 @@ use serde::Deserialize; -#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[derive(Serialize, Deserialize)] enum DeEnum { Unit, Seq(i8, B, C, D), diff --git a/test_suite/tests/expand/derive/enum/generic_enum.expanded.rs b/test_suite/tests/expand/derive/enum/generic_enum.expanded.rs index 2248d30f..0f8b98d9 100644 --- a/test_suite/tests/expand/derive/enum/generic_enum.expanded.rs +++ b/test_suite/tests/expand/derive/enum/generic_enum.expanded.rs @@ -579,4 +579,4 @@ const _IMPL_DESERIALIZE_FOR_GenericEnum: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/enum/lifetimes.expanded.rs b/test_suite/tests/expand/derive/enum/lifetimes.expanded.rs index d90de2f3..941e08f7 100644 --- a/test_suite/tests/expand/derive/enum/lifetimes.expanded.rs +++ b/test_suite/tests/expand/derive/enum/lifetimes.expanded.rs @@ -598,4 +598,4 @@ const _IMPL_DESERIALIZE_FOR_Lifetimes: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/enum/ser_enum.expanded.rs b/test_suite/tests/expand/derive/enum/ser_enum.expanded.rs index 1efead3f..8d917dcc 100644 --- a/test_suite/tests/expand/derive/enum/ser_enum.expanded.rs +++ b/test_suite/tests/expand/derive/enum/ser_enum.expanded.rs @@ -265,4 +265,4 @@ const _IMPL_SERIALIZE_FOR_SerEnum: () = { } } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/enum/void.expanded.rs b/test_suite/tests/expand/derive/enum/void.expanded.rs index 36499321..f7a83aa4 100644 --- a/test_suite/tests/expand/derive/enum/void.expanded.rs +++ b/test_suite/tests/expand/derive/enum/void.expanded.rs @@ -121,4 +121,4 @@ const _IMPL_DESERIALIZE_FOR_Void: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/default_ty_param.expanded.rs b/test_suite/tests/expand/derive/struct/default_ty_param.expanded.rs index 65326f0a..8f9afefc 100644 --- a/test_suite/tests/expand/derive/struct/default_ty_param.expanded.rs +++ b/test_suite/tests/expand/derive/struct/default_ty_param.expanded.rs @@ -398,4 +398,4 @@ const _IMPL_DESERIALIZE_FOR_DefaultTyParam: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/generic_struct.expanded.rs b/test_suite/tests/expand/derive/struct/generic_struct.expanded.rs index 468e5fc0..fb9aa906 100644 --- a/test_suite/tests/expand/derive/struct/generic_struct.expanded.rs +++ b/test_suite/tests/expand/derive/struct/generic_struct.expanded.rs @@ -579,4 +579,4 @@ const _IMPL_DESERIALIZE_FOR_GenericNewTypeStruct: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/generic_tuple_struct.expanded.rs b/test_suite/tests/expand/derive/struct/generic_tuple_struct.expanded.rs index bf3e95a9..8227dc07 100644 --- a/test_suite/tests/expand/derive/struct/generic_tuple_struct.expanded.rs +++ b/test_suite/tests/expand/derive/struct/generic_tuple_struct.expanded.rs @@ -169,4 +169,4 @@ const _IMPL_DESERIALIZE_FOR_GenericTupleStruct: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/named_map.expanded.rs b/test_suite/tests/expand/derive/struct/named_map.expanded.rs index c04e8b9e..88fa708d 100644 --- a/test_suite/tests/expand/derive/struct/named_map.expanded.rs +++ b/test_suite/tests/expand/derive/struct/named_map.expanded.rs @@ -612,4 +612,4 @@ const _IMPL_DESERIALIZE_FOR_DeNamedMap: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/named_tuple.expanded.rs b/test_suite/tests/expand/derive/struct/named_tuple.expanded.rs index 7329de6b..aab87a21 100644 --- a/test_suite/tests/expand/derive/struct/named_tuple.expanded.rs +++ b/test_suite/tests/expand/derive/struct/named_tuple.expanded.rs @@ -247,4 +247,4 @@ const _IMPL_DESERIALIZE_FOR_DeNamedTuple: () = { ) } } -}; \ No newline at end of file +}; diff --git a/test_suite/tests/expand/derive/struct/named_unit.expanded.rs b/test_suite/tests/expand/derive/struct/named_unit.expanded.rs index eda641ca..4156d75b 100644 --- a/test_suite/tests/expand/derive/struct/named_unit.expanded.rs +++ b/test_suite/tests/expand/derive/struct/named_unit.expanded.rs @@ -46,4 +46,4 @@ const _IMPL_DESERIALIZE_FOR_NamedUnit: () = { _serde::Deserializer::deserialize_unit_struct(__deserializer, "NamedUnit", __Visitor) } } -}; \ No newline at end of file +};