I tried this code:
pub struct A {
#[expect(non_snake_case)]
pub direction_L: bool,
}
play
I expected to see this happen: cargo clippy outputs no warnings.
Instead, this happened: cargo clippy outputs 2 warnings, 1. non_snake_case 2. unfulfilled_lint_expectations
warning: structure field `direction_L` should have a snake case name
--> src/lib.rs:3:9
|
3 | pub direction_L: bool,
| ^^^^^^^^^^^ help: convert the identifier to snake case: `direction_l`
|
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
warning: this lint expectation is unfulfilled
--> src/lib.rs:2:14
|
2 | #[expect(non_snake_case)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
Meta
rustc --version --verbose:
The bug also exists in the beta and nightly versions.
Backtrace
I tried this code:
play
I expected to see this happen:
cargo clippyoutputs no warnings.Instead, this happened:
cargo clippyoutputs 2 warnings, 1. non_snake_case 2. unfulfilled_lint_expectationsMeta
rustc --version --verbose:The bug also exists in the beta and nightly versions.
Backtrace