Uh oh!
There was an error while loading. Please reload this page.
Refactor IntErrorKind to avoid "underflow" terminology - #77640
Conversation
KodrAus
left a comment
There was a problem hiding this comment.
Thanks for working on this @ethanboxx! I've left a few little comments.
Since we're making some changes to the shape of the ParseIntError I think we should avoid stabilizing it just yet. Maybe give it a cycle or two with the new variants.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ashley Mannix <kodraus@hey.com>
Co-authored-by: Ashley Mannix <kodraus@hey.com>
Co-authored-by: Ashley Mannix <kodraus@hey.com>
eopb
commented
Oct 26, 2020
@KodrAus Thank you for your review. This should be ready now. |
KodrAus
commented
Nov 6, 2020
Thanks @ethanboxx! This looks good to me. @bors r+ |
bors
commented
Nov 6, 2020
📌 Commit e750238 has been approved by |
int_error_matching attempt 2…t_2, r=KodrAus Refactor IntErrorKind to avoid "underflow" terminology This PR is a continuation of rust-lang#76455 # Changes - `Overflow` renamed to `PosOverflow` and `Underflow` renamed to `NegOverflow` after discussion in rust-lang#76455 - Changed some of the parsing code to return `InvalidDigit` rather than `Empty` for strings "+" and "-". https://users.rust-lang.org/t/misleading-error-in-str-parse-for-int-types/49178 - Carry the problem `char` with the `InvalidDigit` variant. - Necessary changes were made to the compiler as it depends on `int_error_matching`. - Redid tests to match on specific errors. r? `@KodrAus`
…t_2, r=KodrAus Refactor IntErrorKind to avoid "underflow" terminology This PR is a continuation of rust-lang#76455 # Changes - `Overflow` renamed to `PosOverflow` and `Underflow` renamed to `NegOverflow` after discussion in rust-lang#76455 - Changed some of the parsing code to return `InvalidDigit` rather than `Empty` for strings "+" and "-". https://users.rust-lang.org/t/misleading-error-in-str-parse-for-int-types/49178 - Carry the problem `char` with the `InvalidDigit` variant. - Necessary changes were made to the compiler as it depends on `int_error_matching`. - Redid tests to match on specific errors. r? ``@KodrAus``
Rollup of 12 pull requests Successful merges: - rust-lang#77640 (Refactor IntErrorKind to avoid "underflow" terminology) - rust-lang#78026 (Define `fs::hard_link` to not follow symlinks.) - rust-lang#78114 (Recognize `private_intra_doc_links` as a lint) - rust-lang#78228 (Promote aarch64-unknown-linux-gnu to Tier 1) - rust-lang#78345 (Fix handling of item names for HIR) - rust-lang#78437 (BTreeMap: stop mistaking node for an orderly place) - rust-lang#78476 (fix some incorrect aliasing in the BTree) - rust-lang#78674 (inliner: Use substs_for_mir_body) - rust-lang#78748 (Implement destructuring assignment for tuples) - rust-lang#78868 (Fix tab focus on restyled switches) - rust-lang#78878 (Avoid overlapping cfg attributes when both macOS and aarch64) - rust-lang#78882 (Nicer hunk headers for rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…yaahc stabilize `int_error_matching` closesrust-lang#22639 > It has been over half a year since rust-lang#77640 (review), and the indexing question is rejected in rust-lang#79728 (review), so I guess we can submit another stabilization attempt? 😉 _Originally posted by `@kennytm` in rust-lang#22639 (comment)
This PR is a continuation of #76455
Changes
Overflowrenamed toPosOverflowandUnderflowrenamed toNegOverflowafter discussion in stabilizeint_error_matching#76455InvalidDigitrather thanEmptyfor strings "+" and "-". https://users.rust-lang.org/t/misleading-error-in-str-parse-for-int-types/49178charwith theInvalidDigitvariant.int_error_matching.r? @KodrAus