Skip to content

Make RefMut Sync#2

Closed
ChayimFriedman2 wants to merge 1 commit into
masterfrom
refmut-sync
Closed

Make RefMut Sync#2
ChayimFriedman2 wants to merge 1 commit into
masterfrom
refmut-sync

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Owner

This is safe because a &RefMut cannot change the borrow flags.

We cannot impl Send for RefMut because of map_split(); we cannot impl Sync for Ref because of clone().

This is insta-stable and needs a FCP.

This is safe because a `&RefMut` cannot change the borrow flags.

We cannot impl `Send` for `RefMut` because of `map_split()`; we cannot impl `Sync` for `Ref` because of `clone()`.
@ChayimFriedman2 ChayimFriedman2 deleted the refmut-sync branch August 24, 2023 04:57
ChayimFriedman2 pushed a commit that referenced this pull request Nov 28, 2024
…t-2, r=nikomatsakis

Reduce false positives of tail-expr-drop-order from consumed values (attempt #2)

r? `@nikomatsakis`

Tracked by rust-lang#123739.

Related to rust-lang#129864 but not replacing, yet.

Related to rust-lang#130836.

This is an implementation of the approach suggested in the [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/temporary.20drop.20order.20changes). A new MIR statement `BackwardsIncompatibleDrop` is added to the MIR syntax. The lint now works by inspecting possibly live move paths before at the `BackwardsIncompatibleDrop` location and the actual drop under the current edition, which should be one before Edition 2024 in practice.
ChayimFriedman2 pushed a commit that referenced this pull request Sep 2, 2025
…=jieyouxu

Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#1 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
ChayimFriedman2 pushed a commit that referenced this pull request Sep 2, 2025
…=jieyouxu

Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#2 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
ChayimFriedman2 pushed a commit that referenced this pull request Sep 14, 2025
…r=jieyouxu

Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#3 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
ChayimFriedman2 pushed a commit that referenced this pull request Oct 24, 2025
…r=jieyouxu

Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang#5 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that Kivooeo was using.

r? ```@jieyouxu```
ChayimFriedman2 pushed a commit that referenced this pull request Dec 28, 2025
This resulted in the following error for me:

    error[E0464]: multiple candidates for `rlib` dependency `rustc_literal_escaper` found
      --> clippy_dev/src/lib.rs:25:1
       |
    25 | extern crate rustc_literal_escaper;
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: candidate #1: /home/pkrones/.rustup/toolchains/nightly-2025-12-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_literal_escaper-4f30574e01c3dad1.rlib
       = note: candidate #2: /home/pkrones/.rustup/toolchains/nightly-2025-12-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_literal_escaper-c8a0e29ad1040cee.rmeta

Other tools in the Rust repo also take that as an explicit dependency, like rust-analyzer or lint-docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant