-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Summary
In test builds, an expect(clippy::missing_inline_in_public_items)
will report “this lint expectation is unfulfilled” even in cases where warn(clippy::missing_inline_in_public_items)
would warn and therefore the expectation should be fulfilled.
Lint Name
missing_inline_in_public_items
Reproducer
I tried this code with cargo clippy --tests
:
#![warn(clippy::missing_inline_in_public_items)]
#[expect(clippy::missing_inline_in_public_items)]
pub fn foo() -> u32 {
0
}
I saw this happen:
warning: this lint expectation is unfulfilled
--> src/lib.rs:3:10
|
3 | #[expect(clippy::missing_inline_in_public_items)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
I expected to see this happen: No diagnostic
Version
rustc 1.83.0-nightly (adaff5368 2024-09-12)
binary: rustc
commit-hash: adaff5368b0c7b328a0320a218751d65ab1bba97
commit-date: 2024-09-12
host: x86_64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0
Additional Labels
No response
SrTobi
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have