mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 21:05:11 +00:00
clippy, you are truly righteous and exacting
This commit is contained in:
parent
6eb9cb0d1b
commit
8772961573
4 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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() });
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -14,6 +14,7 @@ struct MyInput {
|
|||
field: bool,
|
||||
}
|
||||
|
||||
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||
#[derive(Eq, Hash, Debug, Clone)]
|
||||
struct BadEq {
|
||||
field: bool,
|
||||
|
|
Loading…
Reference in a new issue