-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 more const int ops #53697
Add more const int ops #53697
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #53671) made this pull request unmergeable. Please resolve the merge conflicts. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #53762) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
One function without annotations and a test nit, lgmt otherwise
@bors r+ |
📌 Commit 4811e5b has been approved by |
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
☀️ Test successful - status-appveyor, status-travis |
This PR broke miri's test suite. In particular, this PR fails to properly flag undefined behavior when an @TimDiekmann can you either remove the two "unchecked" intrinsics again, or implement the check that miri performs? Note that "unchecked" means "it is UB to violate the requirement", and detecting such UB is an explicit goal for the miri engine. |
…s, r=oli-obk Add unchecked_shl/shr check for intrinsics to fix miri's test suit r? @RalfJung cc @oli-obk rust-lang#53697 broke miri's test suite as described in [this comment](rust-lang#53697 (comment)). This PR adds test for the `unchecked_shr/shl` for the intrinsics.
r? @oli-obk
Tracking Issue: #53718
list of
const fn
s in this PR:feature = const_int_rotate
rotate_left
rotate_right
feature = const_int_wrapping
wrapping_add
wrapping_sub
wrapping_mul
wrapping_shl
wrapping_shr
feature = const_int_overflowing
overflowing_add
overflowing_sub
overflowing_mul
overflowing_shl
overflowing_shr
feature = const_int_sign
is_positive
is_negative
feature = const_int_conversion
reverse_bits
to_le_bytes
to_ne_bytes
from_be_bytes
from_le_bytes
from_ne_bytes
reverse_bits