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)
This commit is contained in:
Manish Goregaokar
2015-02-25 03:20:58 +05:30
2 changed files with 6 additions and 0 deletions

View File

@@ -122,4 +122,9 @@ mod test {
assert_eq!("-9223372036854775808".parse::<i64>().ok(), Some(i64_val));
assert_eq!("-9223372036854775809".parse::<i64>().ok(), None);
}
#[test]
fn test_int_from_minus_sign() {
assert_eq!("-".parse::<i32>().ok(), None);
}
}