Closed
Description
the following snippet:
#[expect(unused_imports)]
use std::{io, fs};
results in the following compiler output:
warning: this lint expectation is unfulfilled
--> src/main.rs:2:10
|
2 | #[expect(unused_imports)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
but removing the #[expect]
results in:
warning: unused imports: `fs` and `io`
--> src/main.rs:2:11
|
2 | use std::{io, fs};
| ^^ ^^
|
= note: `#[warn(unused_imports)]` on by default
so it is, indeed, supressing the lint - which means the first warning is wrong. it is important to note that the same does not happen on imports of a single item.
rustc version:
rustc 1.81.0-nightly (24d2ac0b5 2024-07-15)
binary: rustc
commit-hash: 24d2ac0b56fcbde13d827745f66e73efb1e17156
commit-date: 2024-07-15
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7