From 027f263ef5a61324fea120234fdc04c57dafb995 Mon Sep 17 00:00:00 2001 From: Victor Song Date: Tue, 30 Jan 2024 01:20:27 -0600 Subject: [PATCH] Note `FIXME` for suffixes --- crates/proc-macro-srv/src/server/rust_analyzer_span.rs | 1 + crates/proc-macro-srv/src/server/token_id.rs | 1 + 2 files changed, 2 insertions(+) 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 4a2ad40ad99..f52a4875b03 100644 --- a/crates/proc-macro-srv/src/server/rust_analyzer_span.rs +++ b/crates/proc-macro-srv/src/server/rust_analyzer_span.rs @@ -76,6 +76,7 @@ fn literal_from_str( let kind = literal_to_external(literal.kind()).ok_or(Err(()))?; + // FIXME: handle more than just int and float suffixes let suffix = match literal.kind() { ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(), _ => None, diff --git a/crates/proc-macro-srv/src/server/token_id.rs b/crates/proc-macro-srv/src/server/token_id.rs index 4dbda7e53c2..d5f73592557 100644 --- a/crates/proc-macro-srv/src/server/token_id.rs +++ b/crates/proc-macro-srv/src/server/token_id.rs @@ -67,6 +67,7 @@ fn literal_from_str( let kind = literal_to_external(literal.kind()).ok_or(Err(()))?; + // FIXME: handle more than just int and float suffixes let suffix = match literal.kind() { ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(), _ => None,