-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Create Atomic<T>
type alias
#130543
base: master
Are you sure you want to change the base?
Create Atomic<T>
type alias
#130543
Conversation
r? @Noratrieb rustbot has assigned @Noratrieb. Use |
This comment was marked as outdated.
This comment was marked as outdated.
bacfd33
to
cc104b1
Compare
macro impl_atomic_primitive( | ||
$Atom:ident $(<$T:ident>)? ($Primitive:ty), | ||
size($size:literal), | ||
align($align:literal) $(,)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI the align is given to impl_atomic_primitive!
because while it isn't actually used in this form, it's needed for the form where Atomic<T>
is the struct definition. So it'll make the next diff a little cleaner (and here is kinda just residual from paring this back to just do an alias initially).
Alright that's the merge conflicts fixed. If I end up needing to continue playing catch-up on some of the touched files, I'll probably just drop files' touch-up to use |
This comment has been minimized.
This comment has been minimized.
r=me after fixing the import issues |
67a79e8
to
fbf092e
Compare
Also found a similar conflict with the windows futex impl plumbing via local check, so that's also resolved by the amend (hopefully; my local checkout suddenly is complaining about duplicate rmeta for crate IIRC I don't have perms to do this but might as well try: @bors r=Noratrieb rollup=iffy |
@CAD97: 🔑 Insufficient privileges: Not in reviewers |
@CAD97: 🔑 Insufficient privileges: not in try users |
@bors r=Noratrieb rollup=iffy |
Create `Atomic<T>` type alias and use it in core/alloc/std where possible, ignoring test files for now. This is step one, creating the alias from `Atomic<T>` to `AtomicT`. The next step of flipping this and aliasing `AtomicT` to `Atomic<T>` will have a bigger impact, since `AtomicT` imports can be dropped once `Atomic::new` is a usable name. First commit is the true change. Second commit is mostly mechanical replacement of `AtomicT` type names with `Atomic<T>`. See [how this was done for `NonZero`](rust-lang#120257) for the rough blueprint I'm following. - ACP: rust-lang/libs-team#443 (comment) - Tracking issue: rust-lang#130539
This comment has been minimized.
This comment has been minimized.
whups |
I
so it might take me a while to diagnose and fix whatever's going on. I did say rollup was iffy 😅 |
@CAD97 I usually give PRs a shot in a rollup even if they're iffy if they haven't ever been tried. |
in core/alloc/std only for now, and ignoring test files
fbf092e
to
00d1ee5
Compare
This comment has been minimized.
This comment has been minimized.
clippy's ref to unfreeze const lint can't see through type projections, so just avoid using a type projection inside of the type of ONCE_INIT.
Oh, I think I might see what the issue could be. The atomic within |
This comment has been minimized.
This comment has been minimized.
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #130724) made this pull request unmergeable. Please resolve the merge conflicts. |
and use it in core/alloc/std where possible, ignoring test files for now.
This is step one, creating the alias from
Atomic<T>
toAtomicT
. The next step of flipping this and aliasingAtomicT
toAtomic<T>
will have a bigger impact, sinceAtomicT
imports can be dropped onceAtomic::new
is a usable name.First commit is the true change. Second commit is mostly mechanical replacement of
AtomicT
type names withAtomic<T>
.See how this was done for
NonZero
for the rough blueprint I'm following.Atomic<T>
libs-team#443 (comment)Atomic
#130539