mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Preserved a comment on the bug previously present in ast::Literal::kind()
This commit is contained in:
parent
3ec781d4f2
commit
b6be1b6f61
1 changed files with 5 additions and 0 deletions
|
@ -322,6 +322,11 @@ impl ast::Literal {
|
|||
|
||||
match token.kind() {
|
||||
INT_NUMBER => {
|
||||
// FYI: there was a bug here previously, thus an if statement here is necessary.
|
||||
// The lexer treated e.g. `1f64` as an integer literal. See
|
||||
// https://github.com/rust-analyzer/rust-analyzer/issues/1592
|
||||
// and the comments on the linked PR.
|
||||
|
||||
let text = token.text();
|
||||
|
||||
if let suffix @ Some(_) = Self::find_suffix(&text, &FLOAT_SUFFIXES) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue