rust/tests/ui/cognitive_complexity_attr_used.rs
2023-08-22 17:18:11 +02:00

17 lines
334 B
Rust

#![warn(unused, clippy::cognitive_complexity)]
#![allow(unused_crate_dependencies)]
fn main() {
kaboom();
}
#[clippy::cognitive_complexity = "0"]
fn kaboom() {
//~^ ERROR: the function has a cognitive complexity of (3/0)
if 42 == 43 {
panic!();
} else if "cake" == "lie" {
println!("what?");
}
}