Skip to content

Make it clear what the alignment needs to be for deallocate - #163171

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:allocator-alignment-fit-docs
Sep 23, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:allocator-alignment-fit-docs

Conversation

@maxdexh

@maxdexh maxdexh commented Sep 22, 2026

Copy link
Copy Markdown
Member

As noticed on zulip, this is insufficiently precise

r? clarfonthey

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 22, 2026
@maxdexh
maxdexh force-pushed the allocator-alignment-fit-docs branch from 736a9dd to ae87ada Compare September 22, 2026 19:01
Comment thread library/core/src/alloc/mod.rs Outdated

@DanielEScherzer DanielEScherzer left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

community review: thanks, this is exactly what I was hoping for when I started that zulip thread

View changes since this review

@maxdexh
maxdexh force-pushed the allocator-alignment-fit-docs branch from ae87ada to 90d7327 Compare September 22, 2026 19:12
@maxdexh

maxdexh commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

Thank you for noticing this! ^^

@DanielEScherzer

Copy link
Copy Markdown
Contributor

@rustbot label +A-allocators A-docs

@rustbot rustbot added A-allocators Area: Custom and system allocators A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Sep 22, 2026
@nia-e

nia-e commented Sep 22, 2026

Copy link
Copy Markdown
Member

this is what we intended to say, yeah

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 90d7327 has been approved by nia-e

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 22, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
Rollup of 7 pull requests

Successful merges:

 - #163170 (Update deprecated rustc_hir imports)
 - #156882 (alloc: stabilise `Allocator`)
 - #163121 (Borrow the destination place with a raw pointer in MIR inlining)
 - #162824 (link the offload with in-tree lld if possible)
 - #163018 (implement (OnceLock,LazyLock)::(get_unchecked,get_unchecked_mut))
 - #163171 (Make it clear what the alignment needs to be for `deallocate`)
 - #163176 (Test unused lifetime params for 'type' and 'union')
@rust-bors
rust-bors Bot merged commit 3a6cdca into rust-lang:main Sep 23, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 23, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
Rollup merge of #163171 - maxdexh:allocator-alignment-fit-docs, r=nia-e

Make it clear what the alignment needs to be for `deallocate`

As noticed on [zulip](https://rust-lang.zulipchat.com/#narrow/channel/197181-t-libs.2Fwg-allocators/topic/Question.3A.20layout.20alignment.20for.20Allocator.3A.3Adeallocate.28.29/with/626111397), this is insufficiently precise

r? clarfonthey
@maxdexh
maxdexh deleted the allocator-alignment-fit-docs branch September 23, 2026 07:14
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Sep 24, 2026
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#163170 (Update deprecated rustc_hir imports)
 - rust-lang/rust#156882 (alloc: stabilise `Allocator`)
 - rust-lang/rust#163121 (Borrow the destination place with a raw pointer in MIR inlining)
 - rust-lang/rust#162824 (link the offload with in-tree lld if possible)
 - rust-lang/rust#163018 (implement (OnceLock,LazyLock)::(get_unchecked,get_unchecked_mut))
 - rust-lang/rust#163171 (Make it clear what the alignment needs to be for `deallocate`)
 - rust-lang/rust#163176 (Test unused lifetime params for 'type' and 'union')
github-actions Bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-allocators Area: Custom and system allocators A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants