Skip to content

Commit

Permalink
Merge pull request #653 from davidbarsky/davidbarsky/fix-completions-…
Browse files Browse the repository at this point in the history
…in-salsa-tracked-fns

chore: fix completions in `#[salsa::tracked]` functions
  • Loading branch information
davidbarsky authored Jan 14, 2025
2 parents 2e7e28b + 5f14bbd commit 022c318
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/salsa-macro-rules/src/setup_tracked_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ macro_rules! setup_tracked_fn {
output_ty: $output_ty:ty,

// Function body, may reference identifiers defined in `$input_pats` and the generics from `$generics`
inner_fn: $inner_fn:item,
inner_fn: {$($inner_fn:tt)*},

// Path to the cycle recovery function to use.
cycle_recovery_fn: ($($cycle_recovery_fn:tt)*),
Expand Down Expand Up @@ -172,7 +172,7 @@ macro_rules! setup_tracked_fn {
}

fn execute<$db_lt>($db: &$db_lt Self::DbView, ($($input_id),*): ($($input_ty),*)) -> Self::Output<$db_lt> {
$inner_fn
$($inner_fn)*

$inner($db, $($input_id),*)
}
Expand Down
2 changes: 1 addition & 1 deletion components/salsa-macros/src/tracked_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl Macro {
input_ids: [#(#input_ids),*],
input_tys: [#(#input_tys),*],
output_ty: #output_ty,
inner_fn: #inner_fn,
inner_fn: { #inner_fn },
cycle_recovery_fn: #cycle_recovery_fn,
cycle_recovery_strategy: #cycle_recovery_strategy,
is_specifiable: #is_specifiable,
Expand Down

0 comments on commit 022c318

Please sign in to comment.