aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-21 18:15:09 +0100
committerGitHub <[email protected]>2020-08-21 18:15:09 +0100
commitaab5aaccf2b1af8f1820a244a2c293c7460f9eb6 (patch)
tree60f971e2be8341c7759defc6662f83d6c47d0fdd /crates/ide
parentdf54561a689a9eb7b1962b69a397a1221200c116 (diff)
parent95f33bb5f73a7f9b7922eef14b996c0a489a6404 (diff)
Merge #5838
5838: :arrow_up: autocfg r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/completion/completion_context.rs2
-rw-r--r--crates/ide/src/syntax_highlighting.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide/src/completion/completion_context.rs b/crates/ide/src/completion/completion_context.rs
index 85456a66f..5adac7ebc 100644
--- a/crates/ide/src/completion/completion_context.rs
+++ b/crates/ide/src/completion/completion_context.rs
@@ -457,7 +457,7 @@ impl<'a> CompletionContext<'a> {
457 if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) { 457 if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) {
458 // As above 458 // As above
459 self.dot_receiver = method_call_expr 459 self.dot_receiver = method_call_expr
460 .expr() 460 .receiver()
461 .map(|e| e.syntax().text_range()) 461 .map(|e| e.syntax().text_range())
462 .and_then(|r| find_node_with_range(original_file, r)); 462 .and_then(|r| find_node_with_range(original_file, r));
463 self.is_call = true; 463 self.is_call = true;
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index dd8cfe42d..aefc86949 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -724,7 +724,8 @@ fn highlight_method_call(
724 hir::Access::Shared => (), 724 hir::Access::Shared => (),
725 hir::Access::Exclusive => h |= HighlightModifier::Mutable, 725 hir::Access::Exclusive => h |= HighlightModifier::Mutable,
726 hir::Access::Owned => { 726 hir::Access::Owned => {
727 if let Some(receiver_ty) = method_call.expr().and_then(|it| sema.type_of_expr(&it)) 727 if let Some(receiver_ty) =
728 method_call.receiver().and_then(|it| sema.type_of_expr(&it))
728 { 729 {
729 if !receiver_ty.is_copy(sema.db) { 730 if !receiver_ty.is_copy(sema.db) {
730 h |= HighlightModifier::Consuming 731 h |= HighlightModifier::Consuming