Skip to content

Introduce #[diagnostic::on_move] on Rc#154678

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

Introduce #[diagnostic::on_move] on Rc#154678
rperier wants to merge 1 commit intorust-lang:mainfrom
rperier:diagnostic_on_move_for_the_rc_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.

This annotates the `Rc` type with the diagnostic attribute
`#[diagnostic::on_move]`. Now when a moved `Rc` is borrowed,
a suggestion to clone it is made, with a label explaining why.
@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? @dingxiangfei2009

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

This must be merged after #154669, probably (due to the feature gate).

r? @tgross35

@rustbot rustbot assigned tgross35 and unassigned dingxiangfei2009 Apr 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 1, 2026

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

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. 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