diff --git a/Cargo.lock b/Cargo.lock index 50c81ca279ee..13cb25f7b03b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,9 +1304,9 @@ version = "0.0.0" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] diff --git a/crates/proc-macro-srv/src/server.rs b/crates/proc-macro-srv/src/server.rs index 6fd8de59342c..1980d4c78bbe 100644 --- a/crates/proc-macro-srv/src/server.rs +++ b/crates/proc-macro-srv/src/server.rs @@ -8,10 +8,7 @@ //! //! FIXME: No span and source file information is implemented yet -use proc_macro::{ - bridge::{self, server}, - LineColumn, -}; +use proc_macro::bridge::{self, server}; mod token_stream; pub use token_stream::TokenStream; @@ -304,14 +301,6 @@ impl server::Span for RustAnalyzer { // FIXME handle span Range { start: 0, end: 0 } } - fn start(&mut self, _span: Self::Span) -> LineColumn { - // FIXME handle span - LineColumn { line: 0, column: 0 } - } - fn end(&mut self, _span: Self::Span) -> LineColumn { - // FIXME handle span - LineColumn { line: 0, column: 0 } - } fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { // Just return the first span again, because some macros will unwrap the result. Some(first) @@ -330,13 +319,23 @@ impl server::Span for RustAnalyzer { tt::TokenId::unspecified() } - fn after(&mut self, _self_: Self::Span) -> Self::Span { + fn end(&mut self, _self_: Self::Span) -> Self::Span { tt::TokenId::unspecified() } - fn before(&mut self, _self_: Self::Span) -> Self::Span { + fn start(&mut self, _self_: Self::Span) -> Self::Span { tt::TokenId::unspecified() } + + fn line(&mut self, _span: Self::Span) -> usize { + // FIXME handle line + 0 + } + + fn column(&mut self, _span: Self::Span) -> usize { + // FIXME handle column + 0 + } } impl server::Symbol for RustAnalyzer {