aboutsummaryrefslogtreecommitdiff
path: root/libcore/ops.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-29 21:16:15 +0300
committerpravic <[email protected]>2016-04-29 21:16:15 +0300
commit77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000 (patch)
tree710e445d56a1a582b8eff19b7b4b180276eae122 /libcore/ops.rs
parenttweak: /driver option specifies /fixed:no implicitly as well (diff)
downloadkmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.tar.xz
kmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.zip
update libcore to 2016-04-29 nightly
Diffstat (limited to 'libcore/ops.rs')
-rw-r--r--libcore/ops.rs43
1 files changed, 14 insertions, 29 deletions
diff --git a/libcore/ops.rs b/libcore/ops.rs
index 9c4bc3b..a2f8423 100644
--- a/libcore/ops.rs
+++ b/libcore/ops.rs
@@ -215,9 +215,7 @@ macro_rules! add_impl {
)*)
}
-add_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-add_impl! { f32 f64 }
+add_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `Sub` trait is used to specify the functionality of `-`.
///
@@ -270,9 +268,7 @@ macro_rules! sub_impl {
)*)
}
-sub_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-sub_impl! { f32 f64 }
+sub_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `Mul` trait is used to specify the functionality of `*`.
///
@@ -325,9 +321,7 @@ macro_rules! mul_impl {
)*)
}
-mul_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-mul_impl! { f32 f64 }
+mul_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `Div` trait is used to specify the functionality of `/`.
///
@@ -398,7 +392,6 @@ macro_rules! div_impl_float {
)*)
}
-#[cfg(not(disable_float))]
div_impl_float! { f32 f64 }
/// The `Rem` trait is used to specify the functionality of `%`.
@@ -470,7 +463,6 @@ macro_rules! rem_impl_float {
)*)
}
-#[cfg(not(disable_float))]
rem_impl_float! { f32 f64 }
/// The `Neg` trait is used to specify the functionality of unary `-`.
@@ -538,9 +530,7 @@ macro_rules! neg_impl_unsigned {
}
// neg_impl_unsigned! { usize u8 u16 u32 u64 }
-neg_impl_numeric! { isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-neg_impl_numeric! { f32 f64 }
+neg_impl_numeric! { isize i8 i16 i32 i64 f32 f64 }
/// The `Not` trait is used to specify the functionality of unary `!`.
///
@@ -938,9 +928,7 @@ macro_rules! add_assign_impl {
)+)
}
-add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-add_assign_impl! { f32 f64 }
+add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `SubAssign` trait is used to specify the functionality of `-=`.
///
@@ -984,9 +972,7 @@ macro_rules! sub_assign_impl {
)+)
}
-sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-sub_assign_impl! { f32 f64 }
+sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `MulAssign` trait is used to specify the functionality of `*=`.
///
@@ -1030,9 +1016,7 @@ macro_rules! mul_assign_impl {
)+)
}
-mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-mul_assign_impl! { f32 f64 }
+mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `DivAssign` trait is used to specify the functionality of `/=`.
///
@@ -1076,9 +1060,7 @@ macro_rules! div_assign_impl {
)+)
}
-div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-div_assign_impl! { f32 f64 }
+div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `RemAssign` trait is used to specify the functionality of `%=`.
///
@@ -1122,9 +1104,7 @@ macro_rules! rem_assign_impl {
)+)
}
-rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
-#[cfg(not(disable_float))]
-rem_assign_impl! { f32 f64 }
+rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
///
@@ -1559,6 +1539,11 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
///
/// See the [`contains()`](#method.contains) method for its characterization.
///
+/// Note: Currently, no overflow checking is done for the iterator
+/// implementation; if you use an integer range and the integer overflows, it
+/// might panic in debug mode or create an endless loop in release mode. This
+/// overflow behavior might change in the future.
+///
/// # Examples
///
/// ```