Skip to content

core: make atomic primitives type aliases of Atomic<T>#153015

Open
joboet wants to merge 6 commits intorust-lang:mainfrom
joboet:atomic_alias_generic
Open

core: make atomic primitives type aliases of Atomic<T>#153015
joboet wants to merge 6 commits intorust-lang:mainfrom
joboet:atomic_alias_generic

Conversation

@joboet
Copy link
Member

@joboet joboet commented Feb 23, 2026

Tracking issue: #130539

This makes AtomicI32 and friends type aliases of Atomic<T> by encoding their alignment requirements via the use of an internal Storage associated type. This is also used to encode that AtomicBool store a u8 internally.

Modulo the Send/Sync implementations, this PR does not move any trait implementations, methods or associated functions – I'll leave that for another PR.

@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 Feb 23, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2026

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, jhpratt, scottmcm

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from 2065018 to affc0ef Compare February 23, 2026 15:49
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@joboet joboet added A-atomic Area: Atomics, barriers, and sync primitives T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Feb 23, 2026
@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from a560a10 to eb42c0f Compare February 23, 2026 23:35
@rust-log-analyzer

This comment has been minimized.

@joboet joboet added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 24, 2026
@joboet
Copy link
Member Author

joboet commented Feb 24, 2026

@rustbot author
Until I finally get CI working...

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2026
@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from 9b27200 to 7d17424 Compare February 24, 2026 13:32
@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from 7d17424 to bbc357f Compare February 24, 2026 14:27
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Feb 25, 2026
@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from 708144d to 34463cb Compare February 25, 2026 16:12
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Feb 25, 2026
The manual `DynSend` implementation for `AtomicPtr` blocks the
auto-implementation for other atomic primitives since they forward to the same
`Atomic<T>` type now. This breakage cannot occur in user code as it depends on
`DynSend` being a custom auto-trait.
... and remove some unused diagnostic items.
@joboet joboet force-pushed the atomic_alias_generic branch from 34463cb to ce4deb4 Compare February 25, 2026 16:19
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@joboet joboet force-pushed the atomic_alias_generic branch from ce4deb4 to f2ee6d0 Compare February 25, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-atomic Area: Atomics, barriers, and sync primitives A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants