Skip to content

Commit

Permalink
internal: pass db_lt to the inner_fn
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Nov 21, 2024
1 parent e4d36da commit c2ce00d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/salsa-macros/src/tracked_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c2ce00d

Please sign in to comment.