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

Fix FormatArgs storage when -Zthreads > 1 #12567

Merged
merged 1 commit into from
May 3, 2024

Conversation

Alexendoo
Copy link
Member

Fixes #11886

The initial way I thought of was a little gross so I never opened a PR for it, I thought of a nicer way today that no longer involves any thread_locals or statics

rustc_data_strucutres::sync::{Lrc, OnceLock} implement DynSend + DynSync so we can pass them to the lint passes that need the storage

changelog: none

r? @flip1995

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 26, 2024
@Alexendoo Alexendoo force-pushed the format-args-storage branch from dcc2b5c to 3758163 Compare March 26, 2024 17:59
@bors
Copy link
Contributor

bors commented Apr 27, 2024

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

@Alexendoo Alexendoo force-pushed the format-args-storage branch from 3758163 to 264a19e Compare April 27, 2024 12:31
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.

This is a nice improvement of that code. One minor comment, otherwise LGTM. r=me once addressed.

clippy_lints/src/lib.rs Outdated Show resolved Hide resolved
@Alexendoo Alexendoo force-pushed the format-args-storage branch from 264a19e to c187bff Compare May 1, 2024 11:35
@flip1995
Copy link
Member

flip1995 commented May 3, 2024

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented May 3, 2024

📌 Commit c187bff has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented May 3, 2024

⌛ Testing commit c187bff with merge 993d8ae...

@bors
Copy link
Contributor

bors commented May 3, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 993d8ae to master...

1 similar comment
@bors
Copy link
Contributor

bors commented May 3, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 993d8ae to master...

@bors bors merged commit 993d8ae into rust-lang:master May 3, 2024
5 checks passed
@bors
Copy link
Contributor

bors commented May 3, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@Alexendoo Alexendoo deleted the format-args-storage branch May 5, 2024 14:17
xxchan added a commit to risingwavelabs/risingwave that referenced this pull request Jul 31, 2024
format_args: rust-lang/rust-clippy#12567

Signed-off-by: xxchan <[email protected]>
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.

-Zthreads breaks the single-threaded assumption made by the format args collector
4 participants