Skip to content

Commit

Permalink
Merge pull request #486 from nikomatsakis/clippy-lints
Browse files Browse the repository at this point in the history
allow various clippy lint groups
  • Loading branch information
nikomatsakis authored Apr 5, 2024
2 parents 3257fa9 + 82b672d commit f5aec4a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions components/salsa-2022-macros/src/accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ fn struct_item_out(
fn inherent_impl(args: &Args, struct_ty: &syn::Type, data_ty: &syn::Type) -> syn::ItemImpl {
let jar_ty = args.jar_ty();
parse_quote_spanned! { struct_ty.span() =>
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl #struct_ty {
pub fn push<DB: ?Sized>(db: &DB, data: #data_ty)
where
Expand All @@ -116,6 +117,7 @@ fn ingredients_for_impl(
let jar_ty = args.jar_ty();
let debug_name = crate::literal(struct_name);
parse_quote_spanned! { struct_name.span() =>
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl salsa::storage::IngredientsFor for #struct_name {
type Ingredients = salsa::accumulator::AccumulatorIngredient<#data_ty>;
type Jar = #jar_ty;
Expand Down Expand Up @@ -143,6 +145,7 @@ fn ingredients_for_impl(
fn accumulator_impl(args: &Args, struct_ty: &syn::Type, data_ty: &syn::Type) -> syn::ItemImpl {
let jar_ty = args.jar_ty();
parse_quote_spanned! { struct_ty.span() =>
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl salsa::accumulator::Accumulator for #struct_ty {
type Data = #data_ty;
type Jar = #jar_ty;
Expand Down
2 changes: 1 addition & 1 deletion components/salsa-2022-macros/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl InputStruct {
}
} else {
parse_quote! {
#[allow(dead_code)]
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl #ident {
#constructor

Expand Down
2 changes: 1 addition & 1 deletion components/salsa-2022-macros/src/interned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl InternedStruct {
};

parse_quote! {
#[allow(dead_code)]
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl #id_ident {
#(#field_getters)*

Expand Down
2 changes: 1 addition & 1 deletion components/salsa-2022-macros/src/tracked_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl TrackedStruct {
let constructor_name = self.constructor_name();

parse_quote! {
#[allow(clippy::too_many_arguments)]
#[allow(dead_code, clippy::pedantic, clippy::complexity, clippy::style)]
impl #ident {
pub fn #constructor_name(__db: &#db_dyn_ty, #(#field_names: #field_tys,)*) -> Self
{
Expand Down

0 comments on commit f5aec4a

Please sign in to comment.