rust: reduce false positives in runnables query (#11845)
Piotr Osiewicz
created
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