Remove stdlib derives and fix expanded files to have newlines at the end

This commit is contained in:
Evgenii P 2019-11-03 20:08:39 +08:00
parent 4dda90502a
commit 640f8e0e82
12 changed files with 12 additions and 219 deletions

View File

@ -7,213 +7,6 @@ enum DeEnum<B, C, D> {
_Seq2(i8, B, C, D),
_Map2 { a: i8, b: B, c: C, d: D },
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl<B: ::core::fmt::Debug, C: ::core::fmt::Debug, D: ::core::fmt::Debug> ::core::fmt::Debug
for DeEnum<B, C, D>
{
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<B, C, D> ::core::marker::StructuralPartialEq for DeEnum<B, C, D> {}
#[automatically_derived]
#[allow(unused_qualifications)]
impl<B: ::core::cmp::PartialEq, C: ::core::cmp::PartialEq, D: ::core::cmp::PartialEq>
::core::cmp::PartialEq for DeEnum<B, C, D>
{
#[inline]
fn eq(&self, other: &DeEnum<B, C, D>) -> 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<B, C, D>) -> 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: () = {
)
}
}
};
};

View File

@ -1,6 +1,6 @@
use serde::Deserialize;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[derive(Serialize, Deserialize)]
enum DeEnum<B, C, D> {
Unit,
Seq(i8, B, C, D),

View File

@ -579,4 +579,4 @@ const _IMPL_DESERIALIZE_FOR_GenericEnum: () = {
)
}
}
};
};

View File

@ -598,4 +598,4 @@ const _IMPL_DESERIALIZE_FOR_Lifetimes: () = {
)
}
}
};
};

View File

@ -265,4 +265,4 @@ const _IMPL_SERIALIZE_FOR_SerEnum: () = {
}
}
}
};
};

View File

@ -121,4 +121,4 @@ const _IMPL_DESERIALIZE_FOR_Void: () = {
)
}
}
};
};

View File

@ -398,4 +398,4 @@ const _IMPL_DESERIALIZE_FOR_DefaultTyParam: () = {
)
}
}
};
};

View File

@ -579,4 +579,4 @@ const _IMPL_DESERIALIZE_FOR_GenericNewTypeStruct: () = {
)
}
}
};
};

View File

@ -169,4 +169,4 @@ const _IMPL_DESERIALIZE_FOR_GenericTupleStruct: () = {
)
}
}
};
};

View File

@ -612,4 +612,4 @@ const _IMPL_DESERIALIZE_FOR_DeNamedMap: () = {
)
}
}
};
};

View File

@ -247,4 +247,4 @@ const _IMPL_DESERIALIZE_FOR_DeNamedTuple: () = {
)
}
}
};
};

View File

@ -46,4 +46,4 @@ const _IMPL_DESERIALIZE_FOR_NamedUnit: () = {
_serde::Deserializer::deserialize_unit_struct(__deserializer, "NamedUnit", __Visitor)
}
}
};
};