Uh oh!
There was an error while loading. Please reload this page.
Use AllocRef for ZSTs in RawVec - #69824
Conversation
rust-highfive
commented
Mar 8, 2020
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 |
a2679ba to
2c8c689Comparerust-highfive
commented
Mar 8, 2020
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 |
rust-highfive
commented
Mar 8, 2020
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 |
TimDiekmann
commented
Mar 8, 2020
@Gankra Do you want to take a look into this, as you have written the first |
TimDiekmann
commented
Mar 9, 2020
I probably want to merge rust-lang/wg-allocators#44 first as well, as |
rust-highfive
commented
Mar 9, 2020
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 |
Amanieu
commented
Mar 9, 2020
My main concern with this change is that we are turning a compile-time check ( |
AFAICT we don't have that runtime check. Let's take
We basically just move the checks one layer down the road. When using Hopefully I didn't miss anything there... 😄 |
bors
commented
Mar 10, 2020
☔ The latest upstream changes (presumably #69879) made this pull request unmergeable. Please resolve the merge conflicts. |
TimDiekmann
commented
Mar 10, 2020
Closing in favor of #69889 |
Moves the responsibility for handling ZSTs from
RawVectoAllocRef. On the same occasion I have moved the logic for reserving and shrinking into the new methodsgrowandshrinkto keep the logic in one place without changing the behavior.Every grow/shrink operation now has three steps:
AllocRefself.ptrandself.capThere are no more checks in
RawVecneeded for taking a different path for ZSTs.This is the last item on the roadmap to support ZSTs in
AllocRef: rust-lang/wg-allocators#38 (comment)Requires #69799 to land first, otherwise
Globalwill be called with zero-sized layouts.closesrust-lang/wg-allocators#38
r? @Amanieu