diff options
Diffstat (limited to 'src/libcore/num/float_macros.rs')
| -rw-r--r-- | src/libcore/num/float_macros.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/num/float_macros.rs b/src/libcore/num/float_macros.rs index 5ee0dc19f9b..e3fa7047ec8 100644 --- a/src/libcore/num/float_macros.rs +++ b/src/libcore/num/float_macros.rs @@ -35,8 +35,8 @@ macro_rules! from_str_radix_float_impl { } let (is_positive, src) = match src.slice_shift_char() { - None => return Err(PFE { kind: Empty }), - Some(('-', "")) => return Err(PFE { kind: Empty }), + None => return Err(PFE { __kind: Empty }), + Some(('-', "")) => return Err(PFE { __kind: Empty }), Some(('-', src)) => (false, src), Some((_, _)) => (true, src), }; @@ -88,7 +88,7 @@ macro_rules! from_str_radix_float_impl { break; // start of fractional part }, _ => { - return Err(PFE { kind: Invalid }); + return Err(PFE { __kind: Invalid }); }, }, } @@ -122,7 +122,7 @@ macro_rules! from_str_radix_float_impl { break; // start of exponent }, _ => { - return Err(PFE { kind: Invalid }); + return Err(PFE { __kind: Invalid }); }, }, } @@ -135,7 +135,7 @@ macro_rules! from_str_radix_float_impl { let base = match c { 'E' | 'e' if radix == 10 => 10.0, 'P' | 'p' if radix == 16 => 2.0, - _ => return Err(PFE { kind: Invalid }), + _ => return Err(PFE { __kind: Invalid }), }; // Parse the exponent as decimal integer @@ -144,13 +144,13 @@ macro_rules! from_str_radix_float_impl { Some(('-', src)) => (false, src.parse::<usize>()), Some(('+', src)) => (true, src.parse::<usize>()), Some((_, _)) => (true, src.parse::<usize>()), - None => return Err(PFE { kind: Invalid }), + None => return Err(PFE { __kind: Invalid }), }; match (is_positive, exp) { (true, Ok(exp)) => base.powi(exp as i32), (false, Ok(exp)) => 1.0 / base.powi(exp as i32), - (_, Err(_)) => return Err(PFE { kind: Invalid }), + (_, Err(_)) => return Err(PFE { __kind: Invalid }), } }, None => 1.0, // no exponent |
