diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 03:20:58 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 03:20:58 +0530 |
| commit | ad73cb0e18da41d020c70efeadac32969d01716c (patch) | |
| tree | 7eca2b3fe3aad01e16acd2844e32cc73de92a9ab /src/libcore | |
| parent | 5af3d660defc3f53995a32e7e8b7847a902745dc (diff) | |
| parent | a9f6f4b73e838e83538d4544141d8354b4633aed (diff) | |
| download | rust-ad73cb0e18da41d020c70efeadac32969d01716c.tar.gz rust-ad73cb0e18da41d020c70efeadac32969d01716c.zip | |
Rollup merge of #22747 - krdln:fix-parsing-minus, r=alexcrichton
Makes Rust less amusing by fixing [#22745](https://github.com/rust-lang/rust/issues/22745)
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/num/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7612469c808..b1039f79f23 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1672,6 +1672,7 @@ macro_rules! from_str_radix_int_impl { let is_signed_ty = (0 as $T) > Int::min_value(); match src.slice_shift_char() { + Some(('-', "")) => Err(PIE { kind: Empty }), Some(('-', src)) if is_signed_ty => { // The number is negative let mut result = 0; |
