-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Specify the result of integer cast on boolean #39210
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
Conversation
@@ -12,7 +12,8 @@ | |||
// | |||
/// The boolean type. | |||
/// | |||
/// The `bool` represents a value, which could only be either `true` or `false`. | |||
/// The `bool` represents a value, which could only be either `true` or `false`. If you cast | |||
/// a `bool` into an integer, `true` will be 1 and `false` will be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the 0.
1dbb802
to
85409f1
Compare
@rkruppe: Good catch, thanks! |
If you wanted to, you could also add an example in the |
I'll then, good idea! |
85409f1
to
b09305e
Compare
Added examples as well. |
@bors r+ rollup |
📌 Commit b09305e has been approved by |
☀️ Test successful - status-appveyor, status-travis |
Fixes #39190.
r? @frewsxcv