Skip to content

New lint: unused underscore prefixed argument - #17422

Open
clueless-skywatcher wants to merge 9 commits into
rust-lang:masterfrom
clueless-skywatcher:new-lint/3219/unused-underscore-prefixed-argument
Open

New lint: unused underscore prefixed argument#17422
clueless-skywatcher wants to merge 9 commits into
rust-lang:masterfrom
clueless-skywatcher:new-lint/3219/unused-underscore-prefixed-argument

Conversation

@clueless-skywatcher

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

changelog: [unused_underscore_prefixed_argument]: add lint

@rustbot rustbot added the S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. label Jul 14, 2026
@rustbot

rustbot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome!

You should hear from one of our reviewers after this PR gets at least 2 reviews from the community.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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 labels Jul 14, 2026
@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 14, 2026
@clueless-skywatcher
clueless-skywatcher force-pushed the new-lint/3219/unused-underscore-prefixed-argument branch from 849d902 to 926c9f2 Compare July 14, 2026 22:07
@rustbot rustbot removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) has-merge-commits PR has merge commits, merge with caution. labels Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Lintcheck changes for ac2a18e

Lint Added Removed Changed
clippy::unused_underscore_prefixed_argument 135 0 0

This comment will be updated if you push new changes

@DanielEScherzer DanielEScherzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Community review: the second new added report given in lintcheck is for https://docs.rs/backtrace/0.3.73/src/backtrace/symbolize/gimli/libs_dl_iterate_phdr.rs.html#42 - this exactly highlights what I was worried about: the signature of the function comes from being passed as a pointer to https://docs.rs/libc/0.2.186/libc/fn.dl_iterate_phdr.html

a few reports later is https://docs.rs/bytes/1.6.1/src/bytes/bytes.rs.html#1146 - this signature comes from being stored in a function pointer field, https://docs.rs/bytes/1.6.1/src/bytes/bytes.rs.html#118

I didn't check all of the hits, but at least some of these are places where the lint is problematic

Maybe start by excluding anything marked as extern ?

View changes since this review

@rustbot

This comment has been minimized.

@Gri-ffin

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 20, 2026
@rustbot

rustbot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@clueless-skywatcher
clueless-skywatcher force-pushed the new-lint/3219/unused-underscore-prefixed-argument branch from 926c9f2 to eefb574 Compare July 29, 2026 14:54
@rustbot

rustbot commented Jul 29, 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 Jul 29, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust-clippy.git master
    $ git push --force-with-lease
    

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Jul 29, 2026
@rustbot

rustbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #17552) 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

has-merge-commits PR has merge commits, merge with caution. needs-fcp PRs that add, remove, or rename lints and need an FCP S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants