Skip to content

Commit 31ef461

Browse files
committed
enable dispatching more places after matching
1 parent 27c7947 commit 31ef461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/formality-core/src/judgment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ macro_rules! push_rules {
159159
};
160160

161161
if let Some(__JudgmentStruct($($input_names),*)) = Some($input_value) {
162-
$crate::push_rules!(@match inputs($($input_names)*) patterns($($patterns)*) args($judgment_name; $n; $v; $output; $($m)*));
162+
$crate::push_rules!(@match inputs($($input_names)*) patterns($($patterns)*) args(@body ($judgment_name; $n; $v; $output); $($m)*));
163163
}
164164
}
165165
};
@@ -172,7 +172,7 @@ macro_rules! push_rules {
172172
// Matching phase: peel off the patterns one by one and match them against the values
173173
// extracted from the input. For anything that is not an identity pattern, invoke `downcast`.
174174

175-
(@match inputs() patterns() args($judgment_name:ident; $n:literal; $v:expr; $output:expr; $($m:tt)*)) => {
175+
(@match inputs() patterns() args(@body ($judgment_name:ident; $n:literal; $v:expr; $output:expr); $($m:tt)*)) => {
176176
tracing::trace_span!("matched rule", rule = $n, judgment = stringify!($judgment_name)).in_scope(|| {
177177
$crate::push_rules!(@body ($judgment_name, $n, $v, $output) $($m)*);
178178
});

0 commit comments

Comments
 (0)