aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/completion_context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/completion_context.rs')
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index 981da2b79..4894ea2f6 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -239,16 +239,15 @@ impl<'a> CompletionContext<'a> {
239 .expr() 239 .expr()
240 .map(|e| e.syntax().text_range()) 240 .map(|e| e.syntax().text_range())
241 .and_then(|r| find_node_with_range(original_file.syntax(), r)); 241 .and_then(|r| find_node_with_range(original_file.syntax(), r));
242 self.dot_receiver_is_ambiguous_float_literal = if let Some(ast::Expr::Literal(l)) = 242 self.dot_receiver_is_ambiguous_float_literal =
243 &self.dot_receiver 243 if let Some(ast::Expr::Literal(l)) = &self.dot_receiver {
244 { 244 match l.kind() {
245 match l.kind() { 245 ast::LiteralKind::FloatNumber { .. } => l.token().text().ends_with('.'),
246 ast::LiteralKind::FloatNumber { suffix: _ } => l.token().text().ends_with('.'), 246 _ => false,
247 _ => false, 247 }
248 } else {
249 false
248 } 250 }
249 } else {
250 false
251 }
252 } 251 }
253 if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) { 252 if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) {
254 // As above 253 // As above