-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
VecDeque: Use power of two capacity even for zero sized types #28494
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
WIP -- still running tests, they probably don't compile.. |
r=me when you get that to compile |
It compiled with one fix. |
@bors r+ |
📌 Commit 838160c has been approved by |
beta nominating as bug fix |
We don't have an "is power of 2" method? IIRC |
@eddyb Oh, we have is_power_of_two(). Didn't know that. It uses your method. |
VecDeque depends on using a power of two capacity. Use the largest possible power of two capacity for ZSTs.
Updated to use is_power_of_two |
@bors r+ |
📌 Commit 66f5dc1 has been approved by |
⌛ Testing commit 66f5dc1 with merge 7e25e63... |
💔 Test failed - auto-linux-64-x-android-t |
I'm not sure why the debuginfo test failed on android, but I think it's safe to retry. @bors retry |
VecDeque: Use power of two capacity even for zero sized types VecDeque depends on using a power of two capacity. Use the largest possible power of two capacity for ZSTs. Fixes #28488
The libs team decided to accept this for a backport to beta |
@alexcrichton Has a stable patch / 1.3.1 been considered? Maybe this is not so serious after all(?). I don't know, but I like fixing bugs. |
No, but this doesn't seem serious enough to warrant the first patch release in Rust ever. |
Well maybe it's the worst regression in stable rust ever? We don't have much history to draw from, is my point. |
VecDeque: Use power of two capacity even for zero sized types
VecDeque depends on using a power of two capacity. Use the largest
possible power of two capacity for ZSTs.
Fixes #28488