Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12696 - smoelius:fix-is_test_module_or_function, r=Ale…
…xendoo Fix `is_test_module_or_function` The rustdoc comment for `is_test_module_or_function` states: https://github.com/rust-lang/rust-clippy/blob/2795a6018944a5918b7d276267165484f5d62d6a/clippy_utils/src/lib.rs#L2561-L2566 Given `item`, the function calls `is_in_test_function` with `item.hir_id()`. However, `is_in_test_function` considers only `item`'s parents, not `item` itself. This PR fixes the problem. The `test_with_disallowed_name` test fails without the fix, but passes once applied. changelog: none
- Loading branch information