-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.S-waiting-on-teamStatus: Awaiting decision from the relevant subteam (see the T-<team> label).Status: Awaiting decision from the relevant subteam (see the T-<team> label).T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The from_str_radix
methods on the various number types panics if radix < 2
or if radix > 36
: https://doc.rust-lang.org/src/core/num/mod.rs.html#2693
I think we should fix this through one of two means:
- Decide that it is a contract violation and document the cases where the function panics.
- Decide that it is a normal error, be thankful that the
ParseIntError
internals aren't exposed, and return an error whenradix
is invalid. Finally, document the error condition.
cc @rust-lang/libs
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.S-waiting-on-teamStatus: Awaiting decision from the relevant subteam (see the T-<team> label).Status: Awaiting decision from the relevant subteam (see the T-<team> label).T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.