rust: reduce false positives in runnables query (#11845)

We were marking `#[cfg(test)]`ed function as a test, which is wrong.
Also allow for other attribute_items (such as #[should_panic]) between
test attribute and a function item.

Release Notes:

- N/A
266643440cPiotr Osiewicz committed on 5/15/2024, 9:42:05 AM· committed by GitHubparent8bc41e1
1 file changedLine totals unavailable