Do not use reference search in runnables::related_tests

This commit is contained in:
Lukas Wirth 2021-11-16 21:32:02 +01:00
parent 0ff380fe17
commit 366499c3be
3 changed files with 48 additions and 42 deletions

View file

@ -228,6 +228,7 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
token.parent().into_iter().flat_map(move |it| self.ancestors_with_macros(it))
}
/// Iterates the ancestors of the given node, climbing up macro expansions while doing so.
pub fn ancestors_with_macros(&self, node: SyntaxNode) -> impl Iterator<Item = SyntaxNode> + '_ {
self.imp.ancestors_with_macros(node)
}