mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-30 11:37:31 +00:00
Make proc_macro span's line & column 1-indexed, as documented
That is, make the fake number that we return 1 and not 0.
This commit is contained in:
parent
d6bf619606
commit
3f2fb17042
2 changed files with 4 additions and 4 deletions
|
|
@ -392,12 +392,12 @@ impl server::Span for RaSpanServer {
|
||||||
|
|
||||||
fn line(&mut self, _span: Self::Span) -> usize {
|
fn line(&mut self, _span: Self::Span) -> usize {
|
||||||
// FIXME requires db to resolve line index, THIS IS NOT INCREMENTAL
|
// FIXME requires db to resolve line index, THIS IS NOT INCREMENTAL
|
||||||
0
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
fn column(&mut self, _span: Self::Span) -> usize {
|
fn column(&mut self, _span: Self::Span) -> usize {
|
||||||
// FIXME requires db to resolve line index, THIS IS NOT INCREMENTAL
|
// FIXME requires db to resolve line index, THIS IS NOT INCREMENTAL
|
||||||
0
|
1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,11 +291,11 @@ impl server::Span for TokenIdServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn line(&mut self, _span: Self::Span) -> usize {
|
fn line(&mut self, _span: Self::Span) -> usize {
|
||||||
0
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
fn column(&mut self, _span: Self::Span) -> usize {
|
fn column(&mut self, _span: Self::Span) -> usize {
|
||||||
0
|
1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue