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

once cell renamings #98165

Merged
merged 2 commits into from
Jun 19, 2022
Merged

once cell renamings #98165

merged 2 commits into from
Jun 19, 2022

Conversation

WaffleLapkin
Copy link
Member

This PR does the renamings proposed in #74465 (comment)

  • Move/rename lazy::{OnceCell, Lazy} to cell::{OnceCell, LazyCell}
  • Move/rename lazy::{SyncOnceCell, SyncLazy} to sync::{OnceLock, LazyLock}

(I used Lazy... instead of ...Lazy as it seems to be more consistent, easier to pronounce, etc)

@rustbot label +T-libs-api -T-libs

@rust-highfive
Copy link
Collaborator

Some changes occurred in clean/types.rs.

cc @camelid

Some changes occured to rustc_codegen_cranelift

cc @bjorn3

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 16, 2022
@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jun 16, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 16, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@veber-alex
Copy link
Contributor

LazyLock is kind of a strange name considering you still need a Mutex or a RwLock to get a mutable reference.

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Clippy changes LGTM now 👍

@m-ou-se
Copy link
Member

m-ou-se commented Jun 18, 2022

Thanks! Looks good to me. Looking at the tracking issue, it seems like there's consensus for this change.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 18, 2022

📌 Commit c1a2db3 has been approved by m-ou-se

@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 Jun 18, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 18, 2022
… r=m-ou-se

once cell renamings

This PR does the renamings proposed in rust-lang#74465 (comment)

- Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
- Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`

(I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)

`@rustbot` label +T-libs-api -T-libs
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 18, 2022
… r=m-ou-se

once cell renamings

This PR does the renamings proposed in rust-lang#74465 (comment)

- Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
- Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`

(I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)

``@rustbot`` label +T-libs-api -T-libs
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#97511 (Don't build the compiler before building rust-demangler)
 - rust-lang#98165 (once cell renamings)
 - rust-lang#98207 (Update cargo)
 - rust-lang#98229 (Add new eslint checks)
 - rust-lang#98230 (Fix weird js condition)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f351f34 into rust-lang:master Jun 19, 2022
AlexTMjugador added a commit to ComunidadAylas/PackSquash that referenced this pull request Jun 20, 2022
rust-lang/rust#98165 landed in the latest Rust
nightly version, which made Dependabot CI runs to fail. Try to get
builds working again by updating the references to the old names
accordingly.

While at it, let's also do some minor dependency version bumps.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 30, 2022
… r=m-ou-se

once cell renamings

This PR does the renamings proposed in rust-lang#74465 (comment)

- Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
- Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`

(I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)

```@rustbot``` label +T-libs-api -T-libs
HerringtonDarkholme added a commit to HerringtonDarkholme/vue-compiler that referenced this pull request Jul 1, 2022
celinval added a commit to celinval/kani-dev that referenced this pull request Jul 6, 2022
The updates required were related to the following changes:
  - Simplify memory ordering intrinsics
    - rust-lang/rust#97423
  - once cell renamings
    - rust-lang/rust#98165
  - Rename the ConstS::val field as kind
    - rust-lang/rust#97935
  - Remove the source archive functionality of ArchiveWriter
    - rust-lang/rust#98098
  - Use valtrees as the type-system representation for constant values
    - rust-lang/rust#96591
@dtolnay dtolnay removed T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 6, 2022
celinval added a commit to model-checking/kani that referenced this pull request Jul 6, 2022
* Update toolchain to 2022-07-05

The updates required were related to the following changes:
  - Simplify memory ordering intrinsics
    - rust-lang/rust#97423
  - once cell renamings
    - rust-lang/rust#98165
  - Rename the ConstS::val field as kind
    - rust-lang/rust#97935
  - Remove the source archive functionality of ArchiveWriter
    - rust-lang/rust#98098
  - Use valtrees as the type-system representation for constant values
    - rust-lang/rust#96591

* Codegen unimplemented for unsupported constant slices

See #1339 for more details.

* Fix copyright check

* Use codegen_option_span instead
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Jul 26, 2022
… r=m-ou-se

once cell renamings

This PR does the renamings proposed in rust-lang#74465 (comment)

- Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
- Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`

(I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)

```@rustbot``` label +T-libs-api -T-libs
Undin added a commit to intellij-rust/intellij-rust that referenced this pull request Aug 6, 2022
est31 added a commit to est31/rust that referenced this pull request Oct 8, 2022
PR rust-lang#98165 with commits 7c360dc and c1a2db3
has moved all of the components of these modules into different places,
namely {std,core}::sync and {std,core}::cell. The empty
modules remained. As they are unstable, we can simply remove them.
@est31
Copy link
Member

est31 commented Oct 8, 2022

This seems to have missed the removal of the std::lazy and core::lazy modules. Was this intentional? If not, I've filed #102812 to remove those modules.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 8, 2022
Remove empty core::lazy and std::lazy

PR rust-lang#98165 with commits 7c360dc and c1a2db3 has moved all of the components of these modules into different places, namely {std,core}::sync and {std,core}::cell. The empty modules remained. As they are unstable, we can simply remove them.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 8, 2022
Remove empty core::lazy and std::lazy

PR rust-lang#98165 with commits 7c360dc and c1a2db3 has moved all of the components of these modules into different places, namely {std,core}::sync and {std,core}::cell. The empty modules remained. As they are unstable, we can simply remove them.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 8, 2022
Remove empty core::lazy and std::lazy

PR rust-lang#98165 with commits 7c360dc and c1a2db3 has moved all of the components of these modules into different places, namely {std,core}::sync and {std,core}::cell. The empty modules remained. As they are unstable, we can simply remove them.
notriddle added a commit to notriddle/rust that referenced this pull request Oct 9, 2022
Remove empty core::lazy and std::lazy

PR rust-lang#98165 with commits 7c360dc and c1a2db3 has moved all of the components of these modules into different places, namely {std,core}::sync and {std,core}::cell. The empty modules remained. As they are unstable, we can simply remove them.
@WaffleLapkin
Copy link
Member Author

@est31 this wasn't intentional, thanks for filling the PR ❤️

yopox pushed a commit to Kobzol/intellij-rust that referenced this pull request Feb 27, 2023
twwn added a commit to twwn/anki that referenced this pull request Sep 27, 2024
…s possible

Since 1.80: rust-lang/rust#109736 and rust-lang/rust#98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: rust-lang/rust#109737
twwn added a commit to twwn/anki that referenced this pull request Sep 27, 2024
…s possible

Since 1.80: rust-lang/rust#109736 and rust-lang/rust#98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: rust-lang/rust#109737
twwn added a commit to twwn/anki that referenced this pull request Sep 27, 2024
… possible

Since 1.80: rust-lang/rust#109736 and rust-lang/rust#98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: rust-lang/rust#109737
twwn added a commit to twwn/anki that referenced this pull request Sep 27, 2024
… possible

Since 1.80: rust-lang/rust#109736 and rust-lang/rust#98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: rust-lang/rust#109737
dae pushed a commit to ankitects/anki that referenced this pull request Sep 30, 2024
* Anki: Replace lazy_static with once_cell

Unify to once_cell, lazy_static's replacement. The latter in unmaintained.

* Anki: Replace once_cell with stabilized LazyCell / LazyLock as far as possible

Since 1.80: rust-lang/rust#109736 and rust-lang/rust#98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: rust-lang/rust#109737

* Declare correct MSRV (dae)

Some of our deps require newer Rust versions, so this was misleading.

Updating the MSRV also allows us to use .inspect() on Option now
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants