-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Stabilize alloc_layout_extra #97438
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
Stabilize alloc_layout_extra #97438
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs +needs-fcp |
73feb13
to
c855385
Compare
This comment has been minimized.
This comment has been minimized.
Reverted the |
(triaging my open PRs) (Trying) Rotating the assignee (it's been a month) r? rust-lang/libs-api Requesting I-libs-api-nominated T-libs-api nomination, for 1) FCP, 2) decision on whether |
☔ The latest upstream changes (presumably #95295) made this pull request unmergeable. Please resolve the merge conflicts. |
👋 Hello, I'm writing this comment in this stabilization PR to notify you, the authors of this PR, that #100591 has been merged, which implemented a change in how features are stabilized. Your PR has been filed before the change, so will likely require modifications in order to comply with the new rules. I recommend you to:
That's it! The If you have any questions, feel free to drop by the zulip stream, or ping me directly in this PR's thread. Thanks! 👋 |
I'm going to close this PR in favor of opening a new one that just stabilizes the truly nonproblematic |
Stabilizes #55724. Specifically, stabilizes the functions
This PR contains one change beyond stabilization: it changes
Layout::repeat
to not add trailing padding (i.e. be equivalent to repeatedextend
calls). This is a functionality change, and should be of special interest during FCP.If libs-api prefers including adding trailing padding in this API, I can revert that part of this PR. Layout code is notorious for being perf-sensitive to the smallest changes, so probably wants a perf run or at least rollup=never while it includes code changes.
Arguments for trailing padding in
Layout::repeat
:Layout::array
in producing layout suitable for an array field, just with a dynamicLayout
rather than a staticT
layoutLayout::extend
layout.repeat(n)?.0.pad_to_align()
subtracts the trailing padding just to add it back on again and the optimizer potentially won't see though thatArguments against trailing padding in
Layout::repeat
Layout::extend
in not adding trailing padding, just extending the layout as necessarylayout.repeat(1)
a no-op rather than padding to alignmentLayout::pad_to_align
Layout::extend