diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter/iterator.rs | 2 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 4 | ||||
| -rw-r--r-- | src/libcore/num/float_macros.rs | 20 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 7 |
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, |
