diff --git a/runtime/queries/rust/locals.scm b/runtime/queries/rust/locals.scm index 7958ef04d..6f8e98f04 100644 --- a/runtime/queries/rust/locals.scm +++ b/runtime/queries/rust/locals.scm @@ -21,3 +21,18 @@ ; References (identifier) @local.reference + +; In here, `bar` is a function, as it is equal to a closure: +; +; let bar = || 4; +; +; After this, we know that `bar` must be a function: +; +; let a = bar; +; ^^^ function +; +; let a = f(bar) +; ^^^ function +(let_declaration + pattern: (identifier) @local.definition.function + value: (closure_expression))