diff options
| author | bors <bors@rust-lang.org> | 2014-01-09 05:06:33 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-09 05:06:33 -0800 |
| commit | ab9ec6d59a0e5e79e553e0e4570a28ded1ead1aa (patch) | |
| tree | 5e07a6413e9cd17fa3d5efcde3b2488b7c802478 /src/libsyntax | |
| parent | fb44e20f657302e9b69101d0c26b095636349d38 (diff) | |
| parent | ceea85a148ec3426edfc00b8353a19c1d2df5dbf (diff) | |
| download | rust-ab9ec6d59a0e5e79e553e0e4570a28ded1ead1aa.tar.gz rust-ab9ec6d59a0e5e79e553e0e4570a28ded1ead1aa.zip | |
auto merge of #11402 : bjz/rust/remove-approx, r=alexcrichton
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases. Third party libraries should implement their own if they need something like it. This closes #5316. r? @alexcrichton, @pcwalton
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 37 |
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. |
