Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs11
1 files changed, 9 insertions, 2 deletions
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 55649ab810..d46f8dc88a 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
@@ -80,9 +80,16 @@ impl server::FreeFunctions for RustAnalyzer {
fn literal_from_str(
&mut self,
- _s: &str,
+ s: &str,
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
- todo!()
+ // TODO: keep track of LitKind and Suffix
+ let symbol = SYMBOL_INTERNER.lock().unwrap().intern(s);
+ Ok(bridge::Literal {
+ kind: bridge::LitKind::Err,
+ symbol,
+ suffix: None,
+ span: tt::TokenId::unspecified(),
+ })
}
}