aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs19
1 files changed, 8 insertions, 11 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index e8fd37bca..9a3b353a9 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -425,28 +425,25 @@ mod tests {
425 assert_debug_snapshot_matches!( 425 assert_debug_snapshot_matches!(
426 do_completion( 426 do_completion(
427 r###" 427 r###"
428 // Mock Future trait from stdlib 428 //- /main.rs
429 pub mod std {
430 pub mod future {
431 #[lang = "future_trait"]
432 pub trait Future {}
433 }
434 }
435
436 use std::future::*; 429 use std::future::*;
437 struct A {} 430 struct A {}
438 impl Future for A {} 431 impl Future for A {}
439
440 fn foo(a: A) { 432 fn foo(a: A) {
441 a.<|> 433 a.<|>
442 } 434 }
435
436 //- /std/lib.rs
437 pub mod future {
438 pub trait Future {}
439 }
443 "###, CompletionKind::Keyword), 440 "###, CompletionKind::Keyword),
444 @r###" 441 @r###"
445 ⋮[ 442 ⋮[
446 ⋮ CompletionItem { 443 ⋮ CompletionItem {
447 ⋮ label: "await", 444 ⋮ label: "await",
448 ⋮ source_range: [358; 358), 445 ⋮ source_range: [74; 74),
449 ⋮ delete: [358; 358), 446 ⋮ delete: [74; 74),
450 ⋮ insert: "await", 447 ⋮ insert: "await",
451 ⋮ detail: "expr.await", 448 ⋮ detail: "expr.await",
452 ⋮ }, 449 ⋮ },