Skip to content

Revert "Suggest using Arc on !Send/!Sync types" #115311

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

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Aug 28, 2023

Closes #114687. This is a clean revert of #88936 + #115210. The suggestion to Arc<{Self}> when Self does not implement Send is always wrong.

#114842 is considering a way to make a more refined suggestion.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Aug 28, 2023
@dtolnay dtolnay added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2023
@compiler-errors
Copy link
Member

Yeah, looking through the UI test changes, it really does look like a lot of them are either inactionable (noting some type that's really deep within an opaque, for example) or wrong (Arc<NotSync>)

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 28, 2023

📌 Commit 823bacb has been approved by compiler-errors

It is now in the queue for this repository.

@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 Aug 28, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 28, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#115164 (MIR validation: reject in-place argument/return for packed fields)
 - rust-lang#115240 (codegen_llvm/llvm_type: avoid matching on the Rust type)
 - rust-lang#115294 (More precisely detect cycle errors from type_of on opaque)
 - rust-lang#115310 (Document panic behavior across editions, and improve xrefs)
 - rust-lang#115311 (Revert "Suggest using `Arc` on `!Send`/`!Sync` types")
 - rust-lang#115317 (Devacationize oli-obk)
 - rust-lang#115319 (don't use SnapshotVec in Graph implementation, as it looks unused; use Vec instead)
 - rust-lang#115322 (Tweak output of `to_pretty_impl_header` involving only anon lifetimes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9b0abe3 into rust-lang:master Aug 28, 2023
@rustbot rustbot added this to the 1.74.0 milestone Aug 28, 2023
@dtolnay dtolnay deleted the usearcself branch August 28, 2023 22:07
@Amanieu Amanieu added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 30, 2023
@cuviper cuviper mentioned this pull request Sep 1, 2023
@cuviper cuviper modified the milestones: 1.74.0, 1.73.0 Sep 1, 2023
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 1, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2023
[beta] backports

- Contents of reachable statics is reachable rust-lang#115114
- Revert "Suggest using `Arc` on `!Send`/`!Sync` types" rust-lang#115311
- Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236
- Do not forget to pass DWARF fragment information to LLVM. rust-lang#115139
- rustdoc: use unicode-aware checks for redundant explicit link fastpath rust-lang#115070

r? cuviper
@dtolnay dtolnay removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion to use Arc<T> is too indiscriminate
6 participants