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

Add signed integer types as implementors of the nonzeroable traits #7

Merged
merged 3 commits into from
Dec 22, 2019

Conversation

antifuchs
Copy link
Owner

No description provided.

This reflects the stable additions from a few releases ago.
@antifuchs
Copy link
Owner Author

bors r+

bors bot added a commit that referenced this pull request Dec 14, 2019
7: Add signed integer types as implementors of the nonzeroable traits r=antifuchs a=antifuchs



Co-authored-by: Andreas Fuchs <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 14, 2019

Timed out

Since casting negative numbers to usize seems really wrong (and it
triggers rust-lang/rust#67539 on nightlies).
Let's use .count_ones() to get a guarantee that the number we have is
non-zero instead.
* Allow main in doctests, we need them for no_std.
* Add a Safety section to as_nonzero_unchecked.
@antifuchs
Copy link
Owner Author

bors r+

bors bot added a commit that referenced this pull request Dec 22, 2019
7: Add signed integer types as implementors of the nonzeroable traits r=antifuchs a=antifuchs



Co-authored-by: Andreas Fuchs <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 22, 2019

Build succeeded

@bors bors bot merged commit f4ebb71 into master Dec 22, 2019
@bors bors bot deleted the signed-ints branch December 22, 2019 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant