From e66d0208bc5b109c2e187aa57a95ec91ae57654a Mon Sep 17 00:00:00 2001 From: Michael van Straten Date: Fri, 10 Mar 2023 22:16:23 +0100 Subject: [PATCH 1/2] Fixed rust-analyser: no implementation for position() --- crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs index d258a024729..e46d51f7b05 100644 --- a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs @@ -20,7 +20,7 @@ mod symbol; pub use symbol::*; -use std::ops::Bound; +use std::ops::{Bound, Range}; use crate::tt; @@ -298,6 +298,10 @@ fn source(&mut self, span: Self::Span) -> Self::Span { // FIXME handle span span } + fn position(&mut self, _span: Self::Span) -> Range { + // FIXME handle span + Range { start: 0, end: 0 } + } fn start(&mut self, _span: Self::Span) -> LineColumn { // FIXME handle span LineColumn { line: 0, column: 0 } From e89d7dfe39c10aefcee285b8012d8ae68ad44830 Mon Sep 17 00:00:00 2001 From: Michael van Straten Date: Sat, 11 Mar 2023 12:14:06 +0100 Subject: [PATCH 2/2] Renamed to byte_range and changed Range generics [skip ci] --- crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs index e46d51f7b05..a9cd8e705a4 100644 --- a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs @@ -298,7 +298,7 @@ fn source(&mut self, span: Self::Span) -> Self::Span { // FIXME handle span span } - fn position(&mut self, _span: Self::Span) -> Range { + fn byte_range(&mut self, _span: Self::Span) -> Range { // FIXME handle span Range { start: 0, end: 0 } }