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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user