diff options
author | Evgenii P <[email protected]> | 2019-08-03 11:07:20 +0100 |
---|---|---|
committer | Evgenii P <[email protected]> | 2019-08-03 11:07:20 +0100 |
commit | 6a94f203fc5e2dc6f48a592c26b48f3a98638d77 (patch) | |
tree | d5fa1f245af600896aaa6e09cd9779c7e478eb64 /crates/ra_ide_api/src/completion | |
parent | 957de26a1dba7134a6b3b340681880060aa90b3c (diff) |
Use std::future::Future trait from stdlib
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 19 |
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 | ⋮ }, |