From 68e670bf544387456ad6ef5ae3a43f331f4e7698 Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Wed, 8 Jan 2025 13:51:23 +0100 Subject: [PATCH] Fix rust runnable is not detected if comment is after #[test] attribute (#22823) Closes #22798 This fixes that we didn't detect the Rust runnable when there was a comment after the `#[test]` attribute. ![Screenshot 2025-01-08 at 13 22 59](https://github.com/user-attachments/assets/bd6a7ae0-93d4-4f93-9d0d-11453acb2032) Release Notes: - Fixed Rust runnable not detected when comment is after `#[test]` attribute. --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> --- crates/languages/src/rust/runnables.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/languages/src/rust/runnables.scm b/crates/languages/src/rust/runnables.scm index 0552a3d79831d2ebc27bd28b47bb58af15e02f51..6d8dee4445364ae56eab933ee382d86c4eda0ffb 100644 --- a/crates/languages/src/rust/runnables.scm +++ b/crates/languages/src/rust/runnables.scm @@ -18,6 +18,8 @@ . (attribute_item) * . + [(line_comment) (block_comment)] * + . (function_item name: (_) @run body: _