rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Emit disallowed_names lint for functions

Open granddaifuku opened this issue 8 months ago • 8 comments

This PR fixes a part of rust-lang/rust-clippy#11306.

Note that disallowed_names still doesn't warn about using disallowed struct (and its field) /module/crate names. I'm planning to address this in a separate PR (if it makes sense to you).

The changes are a bit large, but they primarily involve two updates:

  • Enhancing the disallowed_names lint to emit warnings for functions with disallowed names.
  • Updating tests that include such functions to explicitly allow the lint.

changelog: [disallowed_names]: Warn on usage of disallowed function names

granddaifuku avatar Apr 12 '25 18:04 granddaifuku

r? @y21

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

rustbot avatar Apr 12 '25 18:04 rustbot

:umbrella: The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar May 10 '25 11:05 rustbot

Hi @y21, this PR is ready for review now - could I kindly ask you to take a look when you have a moment? The changes are a bit large, but they primarily involve two updates:

  1. Enhancing the disallowed_names lint to emit warnings for functions with disallowed names.
  2. Updating tests that include such functions to explicitly allow the lint.

Let me know if you have any questions. Thanks in advance!

granddaifuku avatar May 10 '25 15:05 granddaifuku

:umbrella: The latest upstream changes (possibly #14752) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar May 12 '25 16:05 rustbot

:umbrella: The latest upstream changes (possibly b03370b9ce3b2cc0365779862f6c4756ad7de7e2) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar May 18 '25 19:05 rustbot

Hello @y21, I updated the PR to include the up-to-date master branch. Would you mind reviewing this PR when you have a moment? Many thanks!

granddaifuku avatar Jun 01 '25 13:06 granddaifuku

:umbrella: The latest upstream changes (possibly f8a3929c3cc09a63677519f9b5a5da9b25cdd336) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Jun 05 '25 15:06 rustbot

Sorry for the long wait. This change makes sense to me, although given the impact on the tests I created a thread on Zulip to see if there's concerns with this: https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/disallowed_names.20for.20function.20names

Going to leave that for a few days and if nothing comes up then I'd say we're good

y21 avatar Jun 07 '25 10:06 y21