-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work on
Description
I put this code in main.rs
#![deny(clippy::print_stdout)]
mod foo;
#[allow(clippy::print_stdout)]
fn main() {
println!("Hello, world!");
}
And this code in foo.rs
pub fn foo() {
println!("This should trigger clippy");
}
I expected to see clippy warn something like
error: use of `println!`
--> src/foo.rs:2:5
|
6 | println!("This should trigger clippy");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Instead all I get is
warning: function is never used: `foo`
Meta
cargo clippy -V ✘ 101
clippy 0.1.51 (4253153 2021-01-17)
rustc -Vv
rustc 1.51.0-nightly (4253153db 2021-01-17)
binary: rustc
commit-hash: 4253153db205251f72ea4493687a31e04a2a8ca0
commit-date: 2021-01-17
host: x86_64-unknown-linux-gnu
release: 1.51.0-nightly
LLVM version: 11.0.1
EFanZh, dsherret, workflow and SwishSwushPow
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work on