Remove ast::Literal::token

This commit is contained in:
Jonas Schievink 2022-05-03 16:47:33 +02:00
parent 7dfd1cb572
commit 2d5d16f18c
4 changed files with 19 additions and 11 deletions

View file

@ -230,7 +230,7 @@ pub(crate) fn determine_location(
let receiver = find_in_original_file(it.expr(), original_file);
let receiver_is_ambiguous_float_literal = if let Some(ast::Expr::Literal(l)) = &receiver {
match l.kind() {
ast::LiteralKind::FloatNumber { .. } => l.token().text().ends_with('.'),
ast::LiteralKind::FloatNumber { .. } => l.to_string().ends_with('.'),
_ => false,
}
} else {