Only report unique text ranges in highlight_related

This commit is contained in:
Lukas Wirth 2021-08-29 00:45:55 +02:00
parent 72bfbb0691
commit 99f1e66997
3 changed files with 8 additions and 10 deletions

View file

@ -538,6 +538,8 @@ impl<'db> SemanticsImpl<'db> {
res
}
// Note this return type is deliberate as [`find_nodes_at_offset_with_descend`] wants to stop
// traversing the inner iterator when it finds a node.
fn descend_node_at_offset(
&self,
node: &SyntaxNode,