diff --git a/components/salsa-2022-macros/src/salsa_struct.rs b/components/salsa-2022-macros/src/salsa_struct.rs index d88ddf23..6721eb34 100644 --- a/components/salsa-2022-macros/src/salsa_struct.rs +++ b/components/salsa-2022-macros/src/salsa_struct.rs @@ -345,11 +345,3 @@ impl SalsaField { !self.has_no_eq_attr } } - -/// True if this an attribute that salsa permits users to attach to -/// entity/interned fields. -fn is_entity_like_field_attribute(a: &syn::Attribute) -> bool { - FIELD_OPTION_ATTRIBUTES - .iter() - .any(|(fa, _)| a.path.is_ident(fa)) -} diff --git a/components/salsa-2022-macros/src/tracked_fn.rs b/components/salsa-2022-macros/src/tracked_fn.rs index 4305adc9..84be7a37 100644 --- a/components/salsa-2022-macros/src/tracked_fn.rs +++ b/components/salsa-2022-macros/src/tracked_fn.rs @@ -370,10 +370,9 @@ fn specify_fn( item_fn: &syn::ItemFn, config_ty: &syn::Type, ) -> syn::Result> { - let specify = match &args.specify { - Some(s) => s, - None => return Ok(None), - }; + if args.specify.is_none() { + return Ok(None); + } // `specify` has the same signature as the original, // but it takes a value arg and has no return type. diff --git a/salsa-2022-tests/tracked_fn_on_input.rs b/salsa-2022-tests/tracked_fn_on_input.rs index cb989608..9466b0ed 100644 --- a/salsa-2022-tests/tracked_fn_on_input.rs +++ b/salsa-2022-tests/tracked_fn_on_input.rs @@ -1,5 +1,6 @@ //! Test that a `tracked` fn on a `salsa::input` //! compiles and executes successfully. +#![allow(warnings)] #[salsa::jar(db = Db)] struct Jar(MyInput, tracked_fn); diff --git a/salsa-2022-tests/tracked_fn_on_tracked.rs b/salsa-2022-tests/tracked_fn_on_tracked.rs index 49d4f81d..79cfc32a 100644 --- a/salsa-2022-tests/tracked_fn_on_tracked.rs +++ b/salsa-2022-tests/tracked_fn_on_tracked.rs @@ -1,5 +1,6 @@ //! Test that a `tracked` fn on a `salsa::input` //! compiles and executes successfully. +#![allow(dead_code)] #[salsa::jar(db = Db)] struct Jar(MyInput, MyTracked, tracked_fn); diff --git a/salsa-2022-tests/tracked_fn_on_tracked_specify.rs b/salsa-2022-tests/tracked_fn_on_tracked_specify.rs index fe28a63a..57daeb5e 100644 --- a/salsa-2022-tests/tracked_fn_on_tracked_specify.rs +++ b/salsa-2022-tests/tracked_fn_on_tracked_specify.rs @@ -1,5 +1,6 @@ //! Test that a `tracked` fn on a `salsa::input` //! compiles and executes successfully. +#![allow(warnings)] #[salsa::jar(db = Db)] struct Jar(MyInput, MyTracked, tracked_fn, tracked_fn_extra);