@@ -766,17 +766,13 @@ enum Fieldless1 {
766
766
#[allow(unused_qualifications)]
767
767
impl ::core::clone::Clone for Fieldless1 {
768
768
#[inline]
769
- fn clone(&self) -> Fieldless1 {
770
- match self { Fieldless1::A => Fieldless1::A, }
771
- }
769
+ fn clone(&self) -> Fieldless1 { Fieldless1::A }
772
770
}
773
771
#[automatically_derived]
774
772
#[allow(unused_qualifications)]
775
773
impl ::core::fmt::Debug for Fieldless1 {
776
774
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
777
- match self {
778
- Fieldless1::A => ::core::fmt::Formatter::write_str(f, "A"),
779
- }
775
+ ::core::fmt::Formatter::write_str(f, "A")
780
776
}
781
777
}
782
778
#[automatically_derived]
@@ -788,18 +784,14 @@ impl ::core::default::Default for Fieldless1 {
788
784
#[automatically_derived]
789
785
#[allow(unused_qualifications)]
790
786
impl ::core::hash::Hash for Fieldless1 {
791
- fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
792
- match self { _ => {} }
793
- }
787
+ fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {}
794
788
}
795
789
impl ::core::marker::StructuralPartialEq for Fieldless1 {}
796
790
#[automatically_derived]
797
791
#[allow(unused_qualifications)]
798
792
impl ::core::cmp::PartialEq for Fieldless1 {
799
793
#[inline]
800
- fn eq(&self, other: &Fieldless1) -> bool {
801
- match (self, other) { _ => true, }
802
- }
794
+ fn eq(&self, other: &Fieldless1) -> bool { true }
803
795
}
804
796
impl ::core::marker::StructuralEq for Fieldless1 {}
805
797
#[automatically_derived]
@@ -816,17 +808,15 @@ impl ::core::cmp::PartialOrd for Fieldless1 {
816
808
#[inline]
817
809
fn partial_cmp(&self, other: &Fieldless1)
818
810
-> ::core::option::Option<::core::cmp::Ordering> {
819
- match (self, other) {
820
- _ => ::core::option::Option::Some(::core::cmp::Ordering::Equal),
821
- }
811
+ ::core::option::Option::Some(::core::cmp::Ordering::Equal)
822
812
}
823
813
}
824
814
#[automatically_derived]
825
815
#[allow(unused_qualifications)]
826
816
impl ::core::cmp::Ord for Fieldless1 {
827
817
#[inline]
828
818
fn cmp(&self, other: &Fieldless1) -> ::core::cmp::Ordering {
829
- match (self, other) { _ => ::core::cmp::Ordering::Equal, }
819
+ ::core::cmp::Ordering::Equal
830
820
}
831
821
}
832
822
@@ -868,11 +858,8 @@ impl ::core::default::Default for Fieldless {
868
858
#[allow(unused_qualifications)]
869
859
impl ::core::hash::Hash for Fieldless {
870
860
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
871
- match self {
872
- _ =>
873
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
874
- state),
875
- }
861
+ let __self_tag = ::core::intrinsics::discriminant_value(self);
862
+ ::core::hash::Hash::hash(&__self_tag, state)
876
863
}
877
864
}
878
865
impl ::core::marker::StructuralPartialEq for Fieldless {}
@@ -883,9 +870,7 @@ impl ::core::cmp::PartialEq for Fieldless {
883
870
fn eq(&self, other: &Fieldless) -> bool {
884
871
let __self_tag = ::core::intrinsics::discriminant_value(self);
885
872
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
886
- if __self_tag == __arg1_tag {
887
- match (self, other) { _ => true, }
888
- } else { false }
873
+ __self_tag == __arg1_tag
889
874
}
890
875
}
891
876
impl ::core::marker::StructuralEq for Fieldless {}
@@ -905,14 +890,7 @@ impl ::core::cmp::PartialOrd for Fieldless {
905
890
-> ::core::option::Option<::core::cmp::Ordering> {
906
891
let __self_tag = ::core::intrinsics::discriminant_value(self);
907
892
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
908
- if __self_tag == __arg1_tag {
909
- match (self, other) {
910
- _ =>
911
- ::core::option::Option::Some(::core::cmp::Ordering::Equal),
912
- }
913
- } else {
914
- ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag)
915
- }
893
+ ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag)
916
894
}
917
895
}
918
896
#[automatically_derived]
@@ -922,9 +900,7 @@ impl ::core::cmp::Ord for Fieldless {
922
900
fn cmp(&self, other: &Fieldless) -> ::core::cmp::Ordering {
923
901
let __self_tag = ::core::intrinsics::discriminant_value(self);
924
902
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
925
- if __self_tag == __arg1_tag {
926
- match (self, other) { _ => ::core::cmp::Ordering::Equal, }
927
- } else { ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag) }
903
+ ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag)
928
904
}
929
905
}
930
906
@@ -978,21 +954,15 @@ impl ::core::default::Default for Mixed {
978
954
#[allow(unused_qualifications)]
979
955
impl ::core::hash::Hash for Mixed {
980
956
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
957
+ let __self_tag = ::core::intrinsics::discriminant_value(self);
958
+ ::core::hash::Hash::hash(&__self_tag, state);
981
959
match self {
982
- Mixed::R(__self_0) => {
983
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
984
- state);
985
- ::core::hash::Hash::hash(__self_0, state)
986
- }
960
+ Mixed::R(__self_0) => ::core::hash::Hash::hash(__self_0, state),
987
961
Mixed::S { d1: __self_0, d2: __self_1 } => {
988
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
989
- state);
990
962
::core::hash::Hash::hash(__self_0, state);
991
963
::core::hash::Hash::hash(__self_1, state)
992
964
}
993
- _ =>
994
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
995
- state),
965
+ _ => {}
996
966
}
997
967
}
998
968
}
@@ -1004,31 +974,29 @@ impl ::core::cmp::PartialEq for Mixed {
1004
974
fn eq(&self, other: &Mixed) -> bool {
1005
975
let __self_tag = ::core::intrinsics::discriminant_value(self);
1006
976
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1007
- if __self_tag == __arg1_tag {
1008
- match (self, other) {
1009
- (Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
1010
- *__self_0 == *__arg1_0,
1011
- (Mixed::S { d1: __self_0, d2: __self_1 }, Mixed::S {
1012
- d1: __arg1_0, d2: __arg1_1 }) =>
1013
- *__self_0 == *__arg1_0 && *__self_1 == *__arg1_1,
1014
- _ => true,
1015
- }
1016
- } else { false }
977
+ __self_tag == __arg1_tag &&
978
+ match (self, other) {
979
+ (Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
980
+ *__self_0 == *__arg1_0,
981
+ (Mixed::S { d1: __self_0, d2: __self_1 }, Mixed::S {
982
+ d1: __arg1_0, d2: __arg1_1 }) =>
983
+ *__self_0 == *__arg1_0 && *__self_1 == *__arg1_1,
984
+ _ => true,
985
+ }
1017
986
}
1018
987
#[inline]
1019
988
fn ne(&self, other: &Mixed) -> bool {
1020
989
let __self_tag = ::core::intrinsics::discriminant_value(self);
1021
990
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1022
- if __self_tag == __arg1_tag {
1023
- match (self, other) {
1024
- (Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
1025
- *__self_0 != *__arg1_0,
1026
- (Mixed::S { d1: __self_0, d2: __self_1 }, Mixed::S {
1027
- d1: __arg1_0, d2: __arg1_1 }) =>
1028
- *__self_0 != *__arg1_0 || *__self_1 != *__arg1_1,
1029
- _ => false,
1030
- }
1031
- } else { true }
991
+ __self_tag != __arg1_tag ||
992
+ match (self, other) {
993
+ (Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
994
+ *__self_0 != *__arg1_0,
995
+ (Mixed::S { d1: __self_0, d2: __self_1 }, Mixed::S {
996
+ d1: __arg1_0, d2: __arg1_1 }) =>
997
+ *__self_0 != *__arg1_0 || *__self_1 != *__arg1_1,
998
+ _ => false,
999
+ }
1032
1000
}
1033
1001
}
1034
1002
impl ::core::marker::StructuralEq for Mixed {}
@@ -1050,7 +1018,8 @@ impl ::core::cmp::PartialOrd for Mixed {
1050
1018
-> ::core::option::Option<::core::cmp::Ordering> {
1051
1019
let __self_tag = ::core::intrinsics::discriminant_value(self);
1052
1020
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1053
- if __self_tag == __arg1_tag {
1021
+ match ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag) {
1022
+ ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
1054
1023
match (self, other) {
1055
1024
(Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
1056
1025
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
@@ -1064,10 +1033,9 @@ impl ::core::cmp::PartialOrd for Mixed {
1064
1033
},
1065
1034
_ =>
1066
1035
::core::option::Option::Some(::core::cmp::Ordering::Equal),
1067
- }
1068
- } else {
1069
- ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag)
1070
- }
1036
+ },
1037
+ cmp => cmp,
1038
+ }
1071
1039
}
1072
1040
}
1073
1041
#[automatically_derived]
@@ -1077,7 +1045,8 @@ impl ::core::cmp::Ord for Mixed {
1077
1045
fn cmp(&self, other: &Mixed) -> ::core::cmp::Ordering {
1078
1046
let __self_tag = ::core::intrinsics::discriminant_value(self);
1079
1047
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1080
- if __self_tag == __arg1_tag {
1048
+ match ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag) {
1049
+ ::core::cmp::Ordering::Equal =>
1081
1050
match (self, other) {
1082
1051
(Mixed::R(__self_0), Mixed::R(__arg1_0)) =>
1083
1052
::core::cmp::Ord::cmp(__self_0, __arg1_0),
@@ -1089,8 +1058,9 @@ impl ::core::cmp::Ord for Mixed {
1089
1058
cmp => cmp,
1090
1059
},
1091
1060
_ => ::core::cmp::Ordering::Equal,
1092
- }
1093
- } else { ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag) }
1061
+ },
1062
+ cmp => cmp,
1063
+ }
1094
1064
}
1095
1065
}
1096
1066
@@ -1133,22 +1103,12 @@ impl ::core::fmt::Debug for Fielded {
1133
1103
#[allow(unused_qualifications)]
1134
1104
impl ::core::hash::Hash for Fielded {
1135
1105
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
1106
+ let __self_tag = ::core::intrinsics::discriminant_value(self);
1107
+ ::core::hash::Hash::hash(&__self_tag, state);
1136
1108
match self {
1137
- Fielded::X(__self_0) => {
1138
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
1139
- state);
1140
- ::core::hash::Hash::hash(__self_0, state)
1141
- }
1142
- Fielded::Y(__self_0) => {
1143
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
1144
- state);
1145
- ::core::hash::Hash::hash(__self_0, state)
1146
- }
1147
- Fielded::Z(__self_0) => {
1148
- ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
1149
- state);
1150
- ::core::hash::Hash::hash(__self_0, state)
1151
- }
1109
+ Fielded::X(__self_0) => ::core::hash::Hash::hash(__self_0, state),
1110
+ Fielded::Y(__self_0) => ::core::hash::Hash::hash(__self_0, state),
1111
+ Fielded::Z(__self_0) => ::core::hash::Hash::hash(__self_0, state),
1152
1112
}
1153
1113
}
1154
1114
}
@@ -1160,33 +1120,31 @@ impl ::core::cmp::PartialEq for Fielded {
1160
1120
fn eq(&self, other: &Fielded) -> bool {
1161
1121
let __self_tag = ::core::intrinsics::discriminant_value(self);
1162
1122
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1163
- if __self_tag == __arg1_tag {
1164
- match (self, other) {
1165
- (Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1166
- *__self_0 == *__arg1_0,
1167
- (Fielded::Y(__self_0), Fielded::Y(__arg1_0)) =>
1168
- *__self_0 == *__arg1_0,
1169
- (Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1170
- *__self_0 == *__arg1_0,
1171
- _ => unsafe { ::core::intrinsics::unreachable() }
1172
- }
1173
- } else { false }
1123
+ __self_tag == __arg1_tag &&
1124
+ match (self, other) {
1125
+ (Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1126
+ *__self_0 == *__arg1_0,
1127
+ (Fielded::Y(__self_0), Fielded::Y(__arg1_0)) =>
1128
+ *__self_0 == *__arg1_0,
1129
+ (Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1130
+ *__self_0 == *__arg1_0,
1131
+ _ => unsafe { ::core::intrinsics::unreachable() }
1132
+ }
1174
1133
}
1175
1134
#[inline]
1176
1135
fn ne(&self, other: &Fielded) -> bool {
1177
1136
let __self_tag = ::core::intrinsics::discriminant_value(self);
1178
1137
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1179
- if __self_tag == __arg1_tag {
1180
- match (self, other) {
1181
- (Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1182
- *__self_0 != *__arg1_0,
1183
- (Fielded::Y(__self_0), Fielded::Y(__arg1_0)) =>
1184
- *__self_0 != *__arg1_0,
1185
- (Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1186
- *__self_0 != *__arg1_0,
1187
- _ => unsafe { ::core::intrinsics::unreachable() }
1188
- }
1189
- } else { true }
1138
+ __self_tag != __arg1_tag ||
1139
+ match (self, other) {
1140
+ (Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1141
+ *__self_0 != *__arg1_0,
1142
+ (Fielded::Y(__self_0), Fielded::Y(__arg1_0)) =>
1143
+ *__self_0 != *__arg1_0,
1144
+ (Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1145
+ *__self_0 != *__arg1_0,
1146
+ _ => unsafe { ::core::intrinsics::unreachable() }
1147
+ }
1190
1148
}
1191
1149
}
1192
1150
impl ::core::marker::StructuralEq for Fielded {}
@@ -1210,7 +1168,8 @@ impl ::core::cmp::PartialOrd for Fielded {
1210
1168
-> ::core::option::Option<::core::cmp::Ordering> {
1211
1169
let __self_tag = ::core::intrinsics::discriminant_value(self);
1212
1170
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1213
- if __self_tag == __arg1_tag {
1171
+ match ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag) {
1172
+ ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
1214
1173
match (self, other) {
1215
1174
(Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1216
1175
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
@@ -1219,10 +1178,9 @@ impl ::core::cmp::PartialOrd for Fielded {
1219
1178
(Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1220
1179
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
1221
1180
_ => unsafe { ::core::intrinsics::unreachable() }
1222
- }
1223
- } else {
1224
- ::core::cmp::PartialOrd::partial_cmp(&__self_tag, &__arg1_tag)
1225
- }
1181
+ },
1182
+ cmp => cmp,
1183
+ }
1226
1184
}
1227
1185
}
1228
1186
#[automatically_derived]
@@ -1232,7 +1190,8 @@ impl ::core::cmp::Ord for Fielded {
1232
1190
fn cmp(&self, other: &Fielded) -> ::core::cmp::Ordering {
1233
1191
let __self_tag = ::core::intrinsics::discriminant_value(self);
1234
1192
let __arg1_tag = ::core::intrinsics::discriminant_value(other);
1235
- if __self_tag == __arg1_tag {
1193
+ match ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag) {
1194
+ ::core::cmp::Ordering::Equal =>
1236
1195
match (self, other) {
1237
1196
(Fielded::X(__self_0), Fielded::X(__arg1_0)) =>
1238
1197
::core::cmp::Ord::cmp(__self_0, __arg1_0),
@@ -1241,8 +1200,9 @@ impl ::core::cmp::Ord for Fielded {
1241
1200
(Fielded::Z(__self_0), Fielded::Z(__arg1_0)) =>
1242
1201
::core::cmp::Ord::cmp(__self_0, __arg1_0),
1243
1202
_ => unsafe { ::core::intrinsics::unreachable() }
1244
- }
1245
- } else { ::core::cmp::Ord::cmp(&__self_tag, &__arg1_tag) }
1203
+ },
1204
+ cmp => cmp,
1205
+ }
1246
1206
}
1247
1207
}
1248
1208
0 commit comments