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

add new lint non_std_lazy_statics #13770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pitaj
Copy link
Contributor

@pitaj pitaj commented Dec 1, 2024

fixes #12895

detects usage of once_cell::sync::Lazy and lazy_static!, recommending usage of std::sync::LazyLock instead

Many thanks to @J-ZhengLi for putting in most of the work in #12968

changelog: new lint non_std_lazy_statics

@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 2024

r? @llogiq

rustbot has assigned @llogiq.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 1, 2024
@pitaj pitaj changed the title add new lint [non_std_lazy_statics] add new lint non_std_lazy_statics Dec 1, 2024
detect usage of `once_cell::sync::Lazy` and `lazy_static!`,
recommending usage of `std::sync::LazyLock` instead
@bors
Copy link
Contributor

bors commented Dec 5, 2024

☔ The latest upstream changes (presumably a5e46a6) made this pull request unmergeable. Please resolve the merge conflicts.

@llogiq
Copy link
Contributor

llogiq commented Dec 8, 2024

Thank you. This looks like a solid improvement, it just needs a rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recommend std::sync::LazyLock over other lazy static options
5 participants