Skip to content

Commit 483c6f2

Browse files
committed
Merge from rustc
2 parents 63e56f0 + 670a4b5 commit 483c6f2

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/proc-macro-srv/src/server.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
//!
99
//! FIXME: No span and source file information is implemented yet
1010
11-
use proc_macro::{
12-
bridge::{self, server},
13-
LineColumn,
14-
};
11+
use proc_macro::bridge::{self, server};
1512

1613
mod token_stream;
1714
pub use token_stream::TokenStream;
@@ -304,14 +301,6 @@ impl server::Span for RustAnalyzer {
304301
// FIXME handle span
305302
Range { start: 0, end: 0 }
306303
}
307-
fn start(&mut self, _span: Self::Span) -> LineColumn {
308-
// FIXME handle span
309-
LineColumn { line: 0, column: 0 }
310-
}
311-
fn end(&mut self, _span: Self::Span) -> LineColumn {
312-
// FIXME handle span
313-
LineColumn { line: 0, column: 0 }
314-
}
315304
fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
316305
// Just return the first span again, because some macros will unwrap the result.
317306
Some(first)
@@ -330,13 +319,23 @@ impl server::Span for RustAnalyzer {
330319
tt::TokenId::unspecified()
331320
}
332321

333-
fn after(&mut self, _self_: Self::Span) -> Self::Span {
322+
fn end(&mut self, _self_: Self::Span) -> Self::Span {
334323
tt::TokenId::unspecified()
335324
}
336325

337-
fn before(&mut self, _self_: Self::Span) -> Self::Span {
326+
fn start(&mut self, _self_: Self::Span) -> Self::Span {
338327
tt::TokenId::unspecified()
339328
}
329+
330+
fn line(&mut self, _span: Self::Span) -> usize {
331+
// FIXME handle line
332+
0
333+
}
334+
335+
fn column(&mut self, _span: Self::Span) -> usize {
336+
// FIXME handle column
337+
0
338+
}
340339
}
341340

342341
impl server::Symbol for RustAnalyzer {

0 commit comments

Comments
 (0)