mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
fix: Do not merge spans if they have different anchors
This commit is contained in:
parent
dc6cea57a2
commit
49b509310c
@ -1058,7 +1058,7 @@ where
|
||||
// We don't do what rustc does exactly, rustc does something clever when the spans have different syntax contexts
|
||||
// but this runs afoul of our separation between `span` and `hir-expand`.
|
||||
SpanData {
|
||||
range: if a.ctx == b.ctx {
|
||||
range: if a.ctx == b.ctx && a.anchor == b.anchor {
|
||||
TextRange::new(
|
||||
std::cmp::min(a.range.start(), b.range.start()),
|
||||
std::cmp::max(a.range.end(), b.range.end()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user