You can search for functions that appear to satisfy some sort of a shape/type as such input -> output, however that will not work for more complicated searches involving built-in types, including:
- slices
[T] -> *;
- pointers
*mut T -> *;
- tuples
(*, *);
- and similarly multiple arguments
- probably more.
Instead of attempting to guess a what kind of search this is based on -> I propose that we add another "type" indicating that this is a signature we’re looking for and take a type of the function pointer as an argument, so something like this would work:
sig:fn([T]) -> *
sig:fn(*mut T) -> T
- `sig:(A, B)
sig:...
You can search for functions that appear to satisfy some sort of a shape/type as such
input -> output, however that will not work for more complicated searches involving built-in types, including:[T] -> *;*mut T -> *;(*, *);Instead of attempting to guess a what kind of search this is based on
->I propose that we add another "type" indicating that this is a signature we’re looking for and take a type of the function pointer as an argument, so something like this would work:sig:fn([T]) -> *sig:fn(*mut T) -> Tsig:...