-
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 Layout::dangling()
to return a well-aligned NonNull<u8>
#69794
Conversation
@bors r+ |
📌 Commit 09d3ba1 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
@bors r+ rollup=always |
💡 This pull request was already approved, no need to approve it again. |
📌 Commit 09d3ba1 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
Rollup of 8 pull requests Successful merges: - #69667 (Remove the `no_debug` feature) - #69687 (resolve, inconsistent binding mode: tweak wording) - #69708 (On mismatched delimiters, only point at empty blocks that are in the same line) - #69765 (reduce test size for Miri) - #69773 (fix various typos) - #69787 (mir::Local is Copy we can pass it by value in these cases) - #69794 (Add `Layout::dangling()` to return a well-aligned `NonNull<u8>`) - #69797 (Correct version that relaxed orphan rules) Failed merges: r? @ghost
Allow ZSTs in `AllocRef` Allows ZSTs in all `AllocRef` methods. The implementation of `AllocRef` for `Global` and `System` were adjusted to reflect those changes. This is the second item on the roadmap to support ZSTs in `AllocRef`: rust-lang/wg-allocators#38 (comment) After this has landed, I will adapt `RawVec`, but since this will be a pretty big overhaul, it makes sense to do a different PR for it. ~~Requires rust-lang#69794 to land first~~ r? @Amanieu
Allow ZSTs in `AllocRef` Allows ZSTs in all `AllocRef` methods. The implementation of `AllocRef` for `Global` and `System` were adjusted to reflect those changes. This is the second item on the roadmap to support ZSTs in `AllocRef`: rust-lang/wg-allocators#38 (comment) After this has landed, I will adapt `RawVec`, but since this will be a pretty big overhaul, it makes sense to do a different PR for it. ~~Requires rust-lang#69794 to land first~~ r? @Amanieu
Adds a convenient function to
Layout
to create aNonNull<u8>
out of a layout to be returned on ZST allocations.This is the first item on the roadmap to support ZSTs in
AllocRef
: rust-lang/wg-allocators#38 (comment)r? @Amanieu