Skip to content
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 notes about alignment-altering reallocations to Allocator docs #95546

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

autumnontape
Copy link
Contributor

As I said in rust-lang/wg-allocators#97, the fact that calls to grow, grow_zeroed, and shrink may request altered alignments is surprising and may be a pitfall for implementors of Allocator if it's left implicit. This pull request adds a note to the "Safety" section of each function's docs making it explicit.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information.

@Amanieu
Copy link
Member

Amanieu commented Apr 1, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Apr 1, 2022

📌 Commit e246682 has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 1, 2022
@Amanieu
Copy link
Member

Amanieu commented Apr 1, 2022

@bors rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 1, 2022
…n-docs, r=Amanieu

add notes about alignment-altering reallocations to Allocator docs

As I said in rust-lang/wg-allocators#97, the fact that calls to `grow`, `grow_zeroed`, and `shrink` may request altered alignments is surprising and may be a pitfall for implementors of `Allocator` if it's left implicit. This pull request adds a note to the "Safety" section of each function's docs making it explicit.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#95475 (rustdoc: Only show associated consts from inherent impls in sidebar)
 - rust-lang#95516 (ptr_metadata test: avoid ptr-to-int transmutes)
 - rust-lang#95528 (skip slow int_log tests in Miri)
 - rust-lang#95531 (expand: Do not count metavar declarations on RHS of `macro_rules`)
 - rust-lang#95532 (make utf8_char_counts test faster in Miri)
 - rust-lang#95546 (add notes about alignment-altering reallocations to Allocator docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a92286f into rust-lang:master Apr 1, 2022
@rustbot rustbot added this to the 1.61.0 milestone Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants