Skip to content

Conversation

@faeroon
Copy link

@faeroon faeroon commented Feb 1, 2026

implements lint for checking argument rebindings as mut variable

changelog: [fn_arg_mut_rebindings]

  • Followed lint naming conventions
  • Added passing UI tests (including committed .stderr file)
  • cargo test passes locally
  • Executed cargo dev update_lints
  • Added lint documentation
  • Run cargo dev fmt

Fixes #1657. Based on comments for previous PR #6245. Changes comparing to previous:

  1. renames lint to satisfy naming convention
  2. applies lint only to let mut x = x; statements with scope of function body
  3. skips lint for trait implementation functions

@rustbot rustbot added needs-fcp S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Feb 1, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2026

r? @llogiq

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

github-actions bot commented Feb 1, 2026

Lintcheck changes for f002516

Lint Added Removed Changed
clippy::fn_arg_mut_rebindings 5 0 0

This comment will be updated if you push new changes

@faeroon faeroon changed the title add new lint 'fn_arg_mut_rebindings' Add new lint fn_arg_mut_rebindings Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Lint let mut x = x; where x is a function argument

3 participants