Skip to content

Conversation

@samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Dec 20, 2025

Rather than trying to reconstruct the reference type without the mut, remove the mut itself so that user-inserted lifetime information is preserved.

The message has been changed from "consider changing to [NON-MUT REF]" to "remove this mut"

changelog: [needless_pass_by_ref_mut]: preserve user-provided lifetime information

Fixes #16267

Rather than trying to reconstruct the reference type without the `mut`,
remove the `mut` itself so that user-inserted lifetime information is
preserved.

The message has been changed from "consider changing to [NON-MUT REF]"
to "remove this `mut`"
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 2025

r? @Jarcho

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

@github-actions
Copy link

Lintcheck changes for c97d202

Lint Added Removed Changed
clippy::needless_pass_by_ref_mut 0 0 169

This comment will be updated if you push new changes

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.

FP needless-pass-by-ref-mut with lifetimes

3 participants