Skip to content

Commit

Permalink
oh clippy, ye are truly merciless
Browse files Browse the repository at this point in the history
I don't think "ye" is gramatically incorrect
in this position. Sounds wrong.
  • Loading branch information
nikomatsakis committed Apr 2, 2024
1 parent 6eb9cb0 commit c631651
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/salsa-2022-macros/src/tracked_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions salsa-2022-tests/tests/create-empty-database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() });
}
2 changes: 1 addition & 1 deletion salsa-2022-tests/tests/lru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions salsa-2022-tests/tests/tracked-struct-field-bad-eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct MyInput {
field: bool,
}

#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Eq, Hash, Debug, Clone)]
struct BadEq {
field: bool,
Expand Down

0 comments on commit c631651

Please sign in to comment.