unnameable_test_items
does not detect tests in inner modules
#131364
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
L-unnameable_test_items
Lint: unnameable_test_items
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The desired warning is produced if
mod tests
is removed so that theinner_test()
is directly in the function. The warning should be produced in both cases, since both cases are tests that will not be run.The warning was last changed in #114414.
Rust Version
Stable 1.81.0 and nightly 1.83.0-nightly (2024-10-05 9096f4f)
The text was updated successfully, but these errors were encountered: