Skip to content

Introduce #[diagnostic::on_move] on Arc#154669

Open
rperier wants to merge 1 commit intorust-lang:mainfrom
rperier:diagnostic_on_move_for_the_arc_type
Open

Introduce #[diagnostic::on_move] on Arc#154669
rperier wants to merge 1 commit intorust-lang:mainfrom
rperier:diagnostic_on_move_for_the_arc_type

Conversation

@rperier
Copy link
Copy Markdown
Contributor

@rperier rperier commented Apr 1, 2026

This is related to the tracking issue #154181 and to the original issue #149862 .

@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 Apr 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 1, 2026

r? @TaKO8Ki

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 13 candidates

@rperier
Copy link
Copy Markdown
Contributor Author

rperier commented Apr 1, 2026

cc @tgross35

Copy link
Copy Markdown
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, r=me either way

View changes since this review

@tgross35 tgross35 assigned tgross35 and unassigned TaKO8Ki Apr 1, 2026
This annotates the `Arc` type with the diagnostic attribute
`#[diagnostic::on_move]`. Now when a moved `Arc` is borrowed,
a suggestion to clone it is made, with a label explaining why.
@rperier rperier force-pushed the diagnostic_on_move_for_the_arc_type branch from d4ccfcc to 12f8364 Compare April 1, 2026 09:01
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 1, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rperier
Copy link
Copy Markdown
Contributor Author

rperier commented Apr 1, 2026

Rebased onto main and fixed the label message

@tgross35
Copy link
Copy Markdown
Contributor

tgross35 commented Apr 1, 2026

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 1, 2026

📌 Commit 12f8364 has been approved by tgross35

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 1, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 1, 2026
…_arc_type, r=tgross35

Introduce #[diagnostic::on_move] on `Arc`

This is related to the tracking issue rust-lang#154181 and to the original issue rust-lang#149862 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants