about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-13 11:35:59 +0000
committerbors <bors@rust-lang.org>2017-05-13 11:35:59 +0000
commitef3ec5ece5bdf8950810225a9a3bc3cd1926e3d5 (patch)
tree8948bc7cc6fbf6605069fa8e8d9774bc6eac8ab9 /src/libcore
parent453cad6e658e095c6beacf12c589609dac3f4e52 (diff)
parentf28e3cdf54b935d6284bd554e17dc8e44f7b4deb (diff)
downloadrust-ef3ec5ece5bdf8950810225a9a3bc3cd1926e3d5.tar.gz
rust-ef3ec5ece5bdf8950810225a9a3bc3cd1926e3d5.zip
Auto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 15 pull requests

- Successful merges: #41820, #41860, #41876, #41896, #41912, #41916, #41918, #41921, #41923, #41934, #41935, #41940, #41942, #41943, #41951
- Failed merges:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/iterator.rs2
-rw-r--r--src/libcore/lib.rs4
-rw-r--r--src/libcore/num/float_macros.rs20
-rw-r--r--src/libcore/num/mod.rs7
4 files changed, 1 insertions, 32 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs
index b3f4d75c4da..67b97afb976 100644
--- a/src/libcore/iter/iterator.rs
+++ b/src/libcore/iter/iterator.rs
@@ -119,7 +119,7 @@ pub trait Iterator {
     /// // exactly wouldn't be possible without executing filter().
     /// assert_eq!((0, Some(10)), iter.size_hint());
     ///
-    /// // Let's add one five more numbers with chain()
+    /// // Let's add five more numbers with chain()
     /// let iter = (0..10).filter(|x| x % 2 == 0).chain(15..20);
     ///
     /// // now both bounds are increased by five
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 80c2221ce64..b6ab1ecaf4e 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -104,10 +104,6 @@ mod macros;
 #[macro_use]
 mod internal_macros;
 
-#[path = "num/float_macros.rs"]
-#[macro_use]
-mod float_macros;
-
 #[path = "num/int_macros.rs"]
 #[macro_use]
 mod int_macros;
diff --git a/src/libcore/num/float_macros.rs b/src/libcore/num/float_macros.rs
deleted file mode 100644
index b3adef53dab..00000000000
--- a/src/libcore/num/float_macros.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![doc(hidden)]
-
-macro_rules! assert_approx_eq {
-    ($a:expr, $b:expr) => ({
-        use num::Float;
-        let (a, b) = (&$a, &$b);
-        assert!((*a - *b).abs() < 1.0e-6,
-                "{} is not approximately equal to {}", *a, *b);
-    })
-}
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 18e2c1d5c73..8b4002fe9af 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -96,13 +96,6 @@ pub mod dec2flt;
 pub mod bignum;
 pub mod diy_float;
 
-macro_rules! checked_op {
-    ($U:ty, $op:path, $x:expr, $y:expr) => {{
-        let (result, overflowed) = unsafe { $op($x as $U, $y as $U) };
-        if overflowed { None } else { Some(result as Self) }
-    }}
-}
-
 // `Int` + `SignedInt` implemented for signed integers
 macro_rules! int_impl {
     ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr,