Merge pull request #653 from davidbarsky/davidbarsky/fix-completions-in-salsa-tracked-fns
Some checks failed
Book / Book (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled

chore: fix completions in `#[salsa::tracked]` functions
This commit is contained in:
David Barsky 2025-01-14 15:29:34 +00:00 committed by GitHub
commit 022c31835f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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)*),
@ -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),*)
}

View file

@ -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,