-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Create Atomic<T>
type alias
#130543
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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
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.
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
That should be fixed now @rustbot review |
@bors r+ |
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
☔ The latest upstream changes (presumably #136572) made this pull request unmergeable. Please resolve the merge conflicts. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
🤦 Will fix that when I get a chance. @rustbot author |
…solve `<T as Trait>::AssocT` projections (#14125) changelog: [`declare_interior_mutable_const`, `borrow_interior_mutable_const`]: resolve `<T as Trait>::AssocT` projections --- This came up during rust-lang/rust#130543 where we have `<T as AtomicPrimitive>::Assoc = AtomicT` instead of just `AtomicT` and clippy failed to resolve that properly. This really needs a review, because - I don't know if `try_normalize_erasing_regions` is the right thing to call here. - I'm not sure if I peel off the correct amount of `ValTree::Branch` layers (I think I do). Also, shouldn't this lint's infrastructure rely on `Freeze` trait (rust-lang/rust#121675) instead of hardcoding a list of known-to-be-interior-mutable types? --- Previously filed this in the main rust repo (rust-lang/rust#136369), was asked to do it here instead (rust-lang/rust#136369 (comment)).
…Simulacrum Create `Atomic<T>` type alias (rebase) Rebase of rust-lang#130543. Additional changes: - Switch from `allow` to `expect` for `private_bounds` on `AtomicPrimitive` - Unhide `AtomicPrimitive::AtomicInner` from docs, because rustdoc shows the definition `pub type Atomic<T> = <T as AtomicPrimitive>::AtomicInner;` and generated links for it. - `NonZero` did not have this issue, because they kept the new alias private before the direction was changed. - Use `Atomic<_>` in more places, including inside `Once`'s `Futex`. This is possible thanks to rust-lang/rust-clippy#14125 The rest will either get moved back to rust-lang#130543 or rust-lang#130543 will be closed in favor of this instead. --- * ACP: rust-lang/libs-team#443 (comment) * Tracking issue: rust-lang#130539
…Simulacrum Create `Atomic<T>` type alias (rebase) Rebase of rust-lang#130543. Additional changes: - Switch from `allow` to `expect` for `private_bounds` on `AtomicPrimitive` - Unhide `AtomicPrimitive::AtomicInner` from docs, because rustdoc shows the definition `pub type Atomic<T> = <T as AtomicPrimitive>::AtomicInner;` and generated links for it. - `NonZero` did not have this issue, because they kept the new alias private before the direction was changed. - Use `Atomic<_>` in more places, including inside `Once`'s `Futex`. This is possible thanks to rust-lang/rust-clippy#14125 The rest will either get moved back to rust-lang#130543 or rust-lang#130543 will be closed in favor of this instead. --- * ACP: rust-lang/libs-team#443 (comment) * Tracking issue: rust-lang#130539
This got merged in #136316, so it can now be closed, I think |
…Simulacrum Create `Atomic<T>` type alias (rebase) Rebase of rust-lang#130543. Additional changes: - Switch from `allow` to `expect` for `private_bounds` on `AtomicPrimitive` - Unhide `AtomicPrimitive::AtomicInner` from docs, because rustdoc shows the definition `pub type Atomic<T> = <T as AtomicPrimitive>::AtomicInner;` and generated links for it. - `NonZero` did not have this issue, because they kept the new alias private before the direction was changed. - Use `Atomic<_>` in more places, including inside `Once`'s `Futex`. This is possible thanks to rust-lang/rust-clippy#14125 The rest will either get moved back to rust-lang#130543 or rust-lang#130543 will be closed in favor of this instead. --- * ACP: rust-lang/libs-team#443 (comment) * Tracking issue: rust-lang#130539
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