diff --git a/components/salsa-macros/src/tracked_fn.rs b/components/salsa-macros/src/tracked_fn.rs index 57023ef2..d1689af6 100644 --- a/components/salsa-macros/src/tracked_fn.rs +++ b/components/salsa-macros/src/tracked_fn.rs @@ -75,6 +75,10 @@ impl Macro { let mut inner_fn = item.clone(); inner_fn.vis = syn::Visibility::Inherited; inner_fn.sig.ident = self.hygiene.ident("inner"); + // if the tracked_fn has a lifetime, pass it to the `inner_fn` + // if item.sig.generics.lifetimes().peekable().next().is_some() { + inner_fn.sig.generics = parse_quote!(<#db_lt>); + // } let zalsa = self.hygiene.ident("zalsa"); let Configuration = self.hygiene.ident("Configuration");