Skip to content

Add new lint static_mut_vars - #16646

Open
faeroon wants to merge 1 commit into
rust-lang:masterfrom
faeroon:issues/4070
Open

faeroon wants to merge 1 commit into
rust-lang:masterfrom
faeroon:issues/4070

Conversation

@faeroon

@faeroon faeroon commented Feb 27, 2026

Copy link
Copy Markdown

View all comments

implements lint for checking static mut variables usage

changelog: [static_mut_vars]

  • 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 #4070.

@rustbot rustbot added the needs-fcp PRs that add, remove, or rename lints and need an FCP label Feb 27, 2026
@github-actions

github-actions Bot commented Feb 27, 2026

Copy link
Copy Markdown

Lintcheck changes for 0b1c5a9

Lint Added Removed Changed
clippy::static_mut_vars 7 0 0

This comment will be updated if you push new changes

@faeroon faeroon changed the title implement static_mut_vars lint [WIP] implement static_mut_vars lint Feb 27, 2026
@faeroon faeroon changed the title [WIP] implement static_mut_vars lint implement static_mut_vars lint Feb 27, 2026
@faeroon
faeroon marked this pull request as ready for review February 27, 2026 02:01
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 27, 2026
@rustbot

rustbot commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

r? @dswij

rustbot has assigned @dswij.
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: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@dswij

dswij commented Mar 1, 2026

Copy link
Copy Markdown
Member

r? clippy

@rustbot rustbot assigned llogiq and unassigned dswij Mar 1, 2026
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@faeroon faeroon changed the title implement static_mut_vars lint Add new lint static_mut_vars Jul 27, 2026
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

rustbot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master 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.

@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #17751) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp PRs that add, remove, or rename lints and need an 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 static mut FOO: T where T has a safe counterpart

5 participants