Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/server/rust_analyzer_span.rs')
-rw-r--r--crates/proc-macro-srv/src/server/rust_analyzer_span.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/proc-macro-srv/src/server/rust_analyzer_span.rs b/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
index dce4c60b2f..1b883c87ea 100644
--- a/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
+++ b/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
@@ -77,11 +77,11 @@ impl server::FreeFunctions for RaSpanServer {
// FIXME: handle more than just int and float suffixes
let suffix = match literal.kind() {
- ast::LiteralKind::FloatNumber(num) => num.suffix(),
- ast::LiteralKind::IntNumber(num) => num.suffix(),
+ ast::LiteralKind::FloatNumber(num) => num.suffix().map(ToString::to_string),
+ ast::LiteralKind::IntNumber(num) => num.suffix().map(ToString::to_string),
_ => None,
}
- .map(|suffix| Symbol::intern(self.interner, suffix));
+ .map(|suffix| Symbol::intern(self.interner, &suffix));
Ok(bridge::Literal {
kind,