Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs')
| -rw-r--r-- | crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs b/crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs index 61eb4243f8..bdac9c920c 100644 --- a/crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs +++ b/crates/proc-macro-srv/src/server_impl/rust_analyzer_span.rs @@ -189,13 +189,9 @@ impl server::Server for RaSpanServer<'_> { if first.anchor != second.anchor { return self.callback.as_mut()?.span_join(first, second); } - // Differing context, we can't merge these so prefer the one that's root + // Differing context, we can't merge these if first.ctx != second.ctx { - if first.ctx.is_root() { - return Some(second); - } else if second.ctx.is_root() { - return Some(first); - } + return Some(first); } Some(Span { range: first.range.cover(second.range), |