@@ -215,7 +215,9 @@ macro_rules! add_impl {
215
215
) * )
216
216
}
217
217
218
- add_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
218
+ add_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
219
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
220
+ add_impl ! { f32 f64 }
219
221
220
222
/// The `Sub` trait is used to specify the functionality of `-`.
221
223
///
@@ -268,7 +270,9 @@ macro_rules! sub_impl {
268
270
) * )
269
271
}
270
272
271
- sub_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
273
+ sub_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
274
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
275
+ sub_impl ! { f32 f64 }
272
276
273
277
/// The `Mul` trait is used to specify the functionality of `*`.
274
278
///
@@ -321,7 +325,9 @@ macro_rules! mul_impl {
321
325
) * )
322
326
}
323
327
324
- mul_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
328
+ mul_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
329
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
330
+ mul_impl ! { f32 f64 }
325
331
326
332
/// The `Div` trait is used to specify the functionality of `/`.
327
333
///
@@ -392,6 +398,7 @@ macro_rules! div_impl_float {
392
398
) * )
393
399
}
394
400
401
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
395
402
div_impl_float ! { f32 f64 }
396
403
397
404
/// The `Rem` trait is used to specify the functionality of `%`.
@@ -463,6 +470,7 @@ macro_rules! rem_impl_float {
463
470
) * )
464
471
}
465
472
473
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
466
474
rem_impl_float ! { f32 f64 }
467
475
468
476
/// The `Neg` trait is used to specify the functionality of unary `-`.
@@ -530,7 +538,9 @@ macro_rules! neg_impl_unsigned {
530
538
}
531
539
532
540
// neg_impl_unsigned! { usize u8 u16 u32 u64 }
533
- neg_impl_numeric ! { isize i8 i16 i32 i64 f32 f64 }
541
+ neg_impl_numeric ! { isize i8 i16 i32 i64 }
542
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
543
+ neg_impl_numeric ! { f32 f64 }
534
544
535
545
/// The `Not` trait is used to specify the functionality of unary `!`.
536
546
///
@@ -928,7 +938,9 @@ macro_rules! add_assign_impl {
928
938
) +)
929
939
}
930
940
931
- add_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
941
+ add_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
942
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
943
+ add_assign_impl ! { f32 f64 }
932
944
933
945
/// The `SubAssign` trait is used to specify the functionality of `-=`.
934
946
///
@@ -972,7 +984,9 @@ macro_rules! sub_assign_impl {
972
984
) +)
973
985
}
974
986
975
- sub_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
987
+ sub_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
988
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
989
+ sub_assign_impl ! { f32 f64 }
976
990
977
991
/// The `MulAssign` trait is used to specify the functionality of `*=`.
978
992
///
@@ -1016,7 +1030,9 @@ macro_rules! mul_assign_impl {
1016
1030
) +)
1017
1031
}
1018
1032
1019
- mul_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
1033
+ mul_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
1034
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
1035
+ mul_assign_impl ! { f32 f64 }
1020
1036
1021
1037
/// The `DivAssign` trait is used to specify the functionality of `/=`.
1022
1038
///
@@ -1060,7 +1076,9 @@ macro_rules! div_assign_impl {
1060
1076
) +)
1061
1077
}
1062
1078
1063
- div_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
1079
+ div_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
1080
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
1081
+ div_assign_impl ! { f32 f64 }
1064
1082
1065
1083
/// The `RemAssign` trait is used to specify the functionality of `%=`.
1066
1084
///
@@ -1104,7 +1122,9 @@ macro_rules! rem_assign_impl {
1104
1122
) +)
1105
1123
}
1106
1124
1107
- rem_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
1125
+ rem_assign_impl ! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
1126
+ #[ cfg( any( stage0, target_has_floating_point) ) ]
1127
+ rem_assign_impl ! { f32 f64 }
1108
1128
1109
1129
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
1110
1130
///
0 commit comments