Closed
Description
Description
Lint: clippy::fn_params_excessive_bools
#[allow(clippy::fn_params_excessive_bools)]
works on functions and impl blocks, but not on individual methods inside an impl blocks. The problem seams to be, that methods are checked from the impl block, which doesn't process the lint attributes on special functions. See:
rust-clippy/clippy_lints/src/excessive_bools.rs
Lines 162 to 171 in 967f172
Example:
#![deny(clippy::fn_params_excessive_bools)]
#![allow(dead_code)]
pub struct Test;
impl Test {
#[allow(clippy::fn_params_excessive_bools)]
fn new(
is_const: bool,
is_async: bool,
is_unsafe: bool,
is_extern: bool,
is_awesome: bool,
is_special: bool,
) -> Self {
let _b = is_const || is_async || is_unsafe || is_extern || is_awesome || is_special;
todo!()
}
}
Version
rustc 1.66.0-nightly (9062b780b 2022-09-21)
binary: rustc
commit-hash: 9062b780b32d2eab060b4432863e085d9504ca5c
commit-date: 2022-09-21
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.0
Additional Labels
No response