about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-08 22:57:31 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-09 15:41:46 +1100
commitceea85a148ec3426edfc00b8353a19c1d2df5dbf (patch)
tree34005cf06fde432a44cff41aca0a6603b12cf3a4 /src/libsyntax
parent7613b15fdbbb9bf770a2c731f4135886b0ff3cf0 (diff)
downloadrust-ceea85a148ec3426edfc00b8353a19c1d2df5dbf.tar.gz
rust-ceea85a148ec3426edfc00b8353a19c1d2df5dbf.zip
Remove ApproxEq and assert_approx_eq!
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/expand.rs37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index fb98f766fef..5d497dd541f 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -741,43 +741,6 @@ pub fn std_macros() -> @str {
         )
     )
 
-    macro_rules! assert_approx_eq (
-        ($given:expr , $expected:expr) => (
-            {
-                use std::cmp::ApproxEq;
-
-                let given_val = $given;
-                let expected_val = $expected;
-                // check both directions of equality....
-                if !(
-                    given_val.approx_eq(&expected_val) &&
-                    expected_val.approx_eq(&given_val)
-                ) {
-                    fail!("left: {:?} does not approximately equal right: {:?}",
-                           given_val, expected_val);
-                }
-            }
-        );
-        ($given:expr , $expected:expr , $epsilon:expr) => (
-            {
-                use std::cmp::ApproxEq;
-
-                let given_val = $given;
-                let expected_val = $expected;
-                let epsilon_val = $epsilon;
-                // check both directions of equality....
-                if !(
-                    given_val.approx_eq_eps(&expected_val, &epsilon_val) &&
-                    expected_val.approx_eq_eps(&given_val, &epsilon_val)
-                ) {
-                    fail!("left: {:?} does not approximately equal right: \
-                             {:?} with epsilon: {:?}",
-                          given_val, expected_val, epsilon_val);
-                }
-            }
-        )
-    )
-
     /// A utility macro for indicating unreachable code. It will fail if
     /// executed. This is occasionally useful to put after loops that never
     /// terminate normally, but instead directly return from a function.