-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-ssrstructural search & replacestructural search & replaceC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
I'm trying to match all functions, which:
- start with "op_"
- are public
- arbitrary arguments
- have an arbitrary return type (not equal to unit
()
)
I'm using the command line tool, and started witht he following query:
rust-analyzer search 'fn $a( $b:$c ) -> $d { $e }'
The problem is that the search really expects only one instance of $e
. This means it matches only functions with exactly one statement in the body. Also it only matches functions with exactly one argument.
Is there already a way to achive this pattern maching? I would suspect something like $($e)*
to be possible, with matches multiple statements in the body. This would be similar to rust macros.
Metadata
Metadata
Assignees
Labels
A-ssrstructural search & replacestructural search & replaceC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now