mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
ac9dd36856
The only reason to use `abort_if_errors` is when the program is so broken that either: 1. later passes get confused and ICE 2. any diagnostics from later passes would be noise This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints. So it can continue to lint and compile even if there are lint errors.
45 lines
1.1 KiB
Rust
45 lines
1.1 KiB
Rust
#![warn(clippy::fn_params_excessive_bools)]
|
|
#![allow(clippy::too_many_arguments)]
|
|
|
|
extern "C" {
|
|
fn f(_: bool, _: bool, _: bool, _: bool);
|
|
}
|
|
|
|
macro_rules! foo {
|
|
() => {
|
|
fn fff(_: bool, _: bool, _: bool, _: bool) {}
|
|
};
|
|
}
|
|
|
|
foo!();
|
|
|
|
#[no_mangle]
|
|
extern "C" fn k(_: bool, _: bool, _: bool, _: bool) {}
|
|
fn g(_: bool, _: bool, _: bool, _: bool) {}
|
|
fn h(_: bool, _: bool, _: bool) {}
|
|
fn e(_: S, _: S, _: Box<S>, _: Vec<u32>) {}
|
|
fn t(_: S, _: S, _: Box<S>, _: Vec<u32>, _: bool, _: bool, _: bool, _: bool) {}
|
|
|
|
struct S {}
|
|
trait Trait {
|
|
fn f(_: bool, _: bool, _: bool, _: bool);
|
|
fn g(_: bool, _: bool, _: bool, _: Vec<u32>);
|
|
}
|
|
|
|
impl S {
|
|
fn f(&self, _: bool, _: bool, _: bool, _: bool) {}
|
|
fn g(&self, _: bool, _: bool, _: bool) {}
|
|
#[no_mangle]
|
|
extern "C" fn h(_: bool, _: bool, _: bool, _: bool) {}
|
|
}
|
|
|
|
impl Trait for S {
|
|
fn f(_: bool, _: bool, _: bool, _: bool) {}
|
|
fn g(_: bool, _: bool, _: bool, _: Vec<u32>) {}
|
|
}
|
|
|
|
fn main() {
|
|
fn n(_: bool, _: u32, _: bool, _: Box<u32>, _: bool, _: bool) {
|
|
fn nn(_: bool, _: bool, _: bool, _: bool) {}
|
|
}
|
|
}
|