We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54b75a1 + 1f0696d commit 0337e79Copy full SHA for 0337e79
src/tools/rust-analyzer/crates/syntax-bridge/src/lib.rs
@@ -1058,7 +1058,7 @@ where
1058
// We don't do what rustc does exactly, rustc does something clever when the spans have different syntax contexts
1059
// but this runs afoul of our separation between `span` and `hir-expand`.
1060
SpanData {
1061
- range: if a.ctx == b.ctx {
+ range: if a.ctx == b.ctx && a.anchor == b.anchor {
1062
TextRange::new(
1063
std::cmp::min(a.range.start(), b.range.start()),
1064
std::cmp::max(a.range.end(), b.range.end()),
0 commit comments