diff options
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/f32.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/strconv.rs | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index e99dcd6b2eb..3103731a52f 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -820,7 +820,7 @@ impl num::ToStrRadix for f32 { fn to_str_radix(&self, rdx: uint) -> ~str { let (r, special) = strconv::float_to_str_common( *self, rdx, true, strconv::SignNeg, strconv::DigAll); - if special { fail2!("number has a special value, \ + if special { fail!("number has a special value, \ try to_str_radix_special() if those are expected") } r } diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index f367de376d4..da8270703d7 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -868,7 +868,7 @@ impl num::ToStrRadix for f64 { fn to_str_radix(&self, rdx: uint) -> ~str { let (r, special) = strconv::float_to_str_common( *self, rdx, true, strconv::SignNeg, strconv::DigAll); - if special { fail2!("number has a special value, \ + if special { fail!("number has a special value, \ try to_str_radix_special() if those are expected") } r } diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 0f253a26ccf..d17c947ab56 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -473,19 +473,19 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Div<T,T>+ ) -> Option<T> { match exponent { ExpDec if radix >= DIGIT_E_RADIX // decimal exponent 'e' - => fail2!("from_str_bytes_common: radix {:?} incompatible with \ + => fail!("from_str_bytes_common: radix {:?} incompatible with \ use of 'e' as decimal exponent", radix), ExpBin if radix >= DIGIT_P_RADIX // binary exponent 'p' - => fail2!("from_str_bytes_common: radix {:?} incompatible with \ + => fail!("from_str_bytes_common: radix {:?} incompatible with \ use of 'p' as binary exponent", radix), _ if special && radix >= DIGIT_I_RADIX // first digit of 'inf' - => fail2!("from_str_bytes_common: radix {:?} incompatible with \ + => fail!("from_str_bytes_common: radix {:?} incompatible with \ special values 'inf' and 'NaN'", radix), _ if (radix as int) < 2 - => fail2!("from_str_bytes_common: radix {:?} to low, \ + => fail!("from_str_bytes_common: radix {:?} to low, \ must lie in the range [2, 36]", radix), _ if (radix as int) > 36 - => fail2!("from_str_bytes_common: radix {:?} to high, \ + => fail!("from_str_bytes_common: radix {:?} to high, \ must lie in the range [2, 36]", radix), _ => () } |
