clippy, you are truly righteous and exacting

This commit is contained in:
Niko Matsakis 2024-04-02 07:04:29 -04:00
parent 6eb9cb0d1b
commit 8772961573
4 changed files with 4 additions and 1 deletions

View file

@ -195,6 +195,7 @@ impl TrackedStruct {
let constructor_name = self.constructor_name();
parse_quote! {
#[allow(clippy::too_many_arguments)]
impl #ident {
pub fn #constructor_name(__db: &#db_dyn_ty, #(#field_names: #field_tys,)*) -> Self
{

View file

@ -31,5 +31,6 @@ fn ensure_init(place: *const <Database as HasJars>::Jars) {
// SAFETY: Intentionally tries to access potentially uninitialized memory,
// so that miri can catch if we accidentally forget to initialize the memory.
#[allow(clippy::forget_non_drop)]
forget(unsafe { addr_of!((*place).0).read() });
}

View file

@ -19,7 +19,7 @@ trait Db: salsa::DbWithJar<Jar> + HasLogger {}
struct HotPotato(u32);
thread_local! {
static N_POTATOES: AtomicUsize = AtomicUsize::new(0)
static N_POTATOES: AtomicUsize = const { AtomicUsize::new(0) }
}
impl HotPotato {

View file

@ -14,6 +14,7 @@ struct MyInput {
field: bool,
}
#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Eq, Hash, Debug, Clone)]
struct BadEq {
field: bool,