-
Notifications
You must be signed in to change notification settings - Fork 504
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
Document bool cast semantics #20
Comments
As I've said in rust-lang/rust#34729, it is defined indirectly in the reference, but not directly (yet). |
Related to casting: #10 |
#13 closes this (unless the behavior is not in fact guaranteed to be true to 1, false to 0). |
Triage: looks like this is fixed now |
Agreed, thanks for pointing it out! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved from rust-lang/rust#34729
After a short debate on the IRC over whether true as i32 is guaranteed to be 1, and false as i32 is guaranteed to be 0, I think that the semantics section on casts should explicitly describe what a bool as integer_type cast does.
The text was updated successfully, but these errors were encountered: