Expand description
Searching for matches.
Structs§
- Usage
Cache 🔒 - A cache for the results of find_usages. This is for when we have multiple patterns that have the
same path. e.g. if the pattern was
foo::Barthat can parse as a path, an expression, a type and as a pattern. In each, the usages offoo::Barare the same and we’d like to avoid finding them more than once.
Functions§
- is_
search_ 🔒permitted - Returns whether we support matching within this kind of node.
- is_
search_ 🔒permitted_ ancestors - Returns whether we support matching within
nodeand all of its ancestors. - pick_
path_ 🔒for_ usages - Returns a path that’s suitable for path resolution. We exclude builtin types, since they aren’t something that we can find references to. We then somewhat arbitrarily pick the path that is the longest as this is hopefully more likely to be less common, making it faster to find.