Skip to content

New lint: unused underscore prefixed argument#17422

Open
clueless-skywatcher wants to merge 4 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 4 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

Copy link
Copy Markdown

Lintcheck changes for 926c9f2

Lint Added Removed Changed
clippy::unused_underscore_prefixed_argument 161 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 warned 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

rustbot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #17385) 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-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. 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.

3 participants