Skip to content

Commit

Permalink
fix completions in #[salsa::tracked] functions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Jan 7, 2025
1 parent b0623c0 commit 5f14bbd
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 5f14bbd

Please sign in to comment.