Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checked methods on integers should return Result #32694

Closed
Zoxc opened this Issue Apr 3, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@Zoxc
Copy link
Contributor

Zoxc commented Apr 3, 2016

The checked_* methods in primitive integers should return Result so they are usable with ?.

Tag with rust-2-breakage-wishlist

@bstrie

This comment has been minimized.

Copy link
Contributor

bstrie commented Apr 3, 2016

As noted on IRC, there has been some existing desire to make ? work with Option as well, which would achieve this without any breakage.

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

Zoxc commented Apr 3, 2016

@bstrie That wouldn't make it possible to distinguish between different None error cases. Like integer overflow, or a value missing from a HashMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.