Skip to content

Remove lazy_static mention #12900

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

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Remove lazy_static mention #12900

merged 1 commit into from
Jun 7, 2024

Conversation

Alexendoo
Copy link
Member

I planned to replace any mention with LazyLock but I think thread_local is more appropriate here - consts that aren't Sync wouldn't be able to go in a lazy_static/static LazyLock either

Also removed a test file that was mostly commented out so wasn't testing anything

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 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 Jun 7, 2024
@llogiq
Copy link
Contributor

llogiq commented Jun 7, 2024

I do worry that without further documentation the suggestion to make a static or thread_local isn't very helpful. Could we amend the lint docs to give some guidance when to use what?

@Alexendoo
Copy link
Member Author

Updated it to not mention thread_local if it's already Sync and make it a bit clearer that it's the fallback solution

@llogiq
Copy link
Contributor

llogiq commented Jun 7, 2024

That works for me. Thank you!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 7, 2024

📌 Commit 65af5d7 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 7, 2024

⌛ Testing commit 65af5d7 with merge 0ea88b9...

@bors
Copy link
Contributor

bors commented Jun 7, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 0ea88b9 to master...

@bors bors merged commit 0ea88b9 into rust-lang:master Jun 7, 2024
5 checks passed
@Alexendoo Alexendoo deleted the no-lazy-static branch June 7, 2024 23:18
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.

4 participants