You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
est31 commentedon Mar 23, 2017
As I've said in rust-lang/rust#34729, it is defined indirectly in the reference, but not directly (yet).
frewsxcv commentedon Mar 25, 2017
Related to casting: #10
matthewjasper commentedon Jun 2, 2017
#13 closes this (unless the behavior is not in fact guaranteed to be true to 1, false to 0).
chordowl commentedon Aug 17, 2017
Triage: looks like this is fixed now
frewsxcv commentedon Aug 17, 2017
Agreed, thanks for pointing it out!