From 09348b247465864c6462a39055803bcbb0156cfe Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 2 Oct 2020 16:13:48 +0200 Subject: Get rid of MockAnalysis --- crates/ide/src/completion/complete_keyword.rs | 8 ++++---- crates/ide/src/completion/complete_mod.rs | 4 ++-- crates/ide/src/completion/complete_qualified_path.rs | 4 ++-- crates/ide/src/completion/complete_unqualified_path.rs | 14 +++++++------- crates/ide/src/completion/presentation.rs | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'crates/ide/src/completion') diff --git a/crates/ide/src/completion/complete_keyword.rs b/crates/ide/src/completion/complete_keyword.rs index 5645b41fa..e59747095 100644 --- a/crates/ide/src/completion/complete_keyword.rs +++ b/crates/ide/src/completion/complete_keyword.rs @@ -495,13 +495,13 @@ Some multi-line comment<|> fn test_completion_await_impls_future() { check( r#" -//- /main.rs +//- /main.rs crate:main deps:std use std::future::*; struct A {} impl Future for A {} fn foo(a: A) { a.<|> } -//- /std/lib.rs +//- /std/lib.rs crate:std pub mod future { #[lang = "future_trait"] pub trait Future {} @@ -514,14 +514,14 @@ pub mod future { check( r#" -//- /main.rs +//- /main.rs crate:main deps:std use std::future::*; fn foo() { let a = async {}; a.<|> } -//- /std/lib.rs +//- /std/lib.rs crate:std pub mod future { #[lang = "future_trait"] pub trait Future { diff --git a/crates/ide/src/completion/complete_mod.rs b/crates/ide/src/completion/complete_mod.rs index 3cfc2e131..c7a99bdc3 100644 --- a/crates/ide/src/completion/complete_mod.rs +++ b/crates/ide/src/completion/complete_mod.rs @@ -300,7 +300,7 @@ mod tests { // "#, // expect![[r#" // md bar; - // "#]], + // "#]],foo // ); // } @@ -308,7 +308,7 @@ mod tests { fn already_declared_bin_module_completion_omitted() { check( r#" - //- /src/bin.rs + //- /src/bin.rs crate:main fn main() {} //- /src/bin/foo.rs mod <|> diff --git a/crates/ide/src/completion/complete_qualified_path.rs b/crates/ide/src/completion/complete_qualified_path.rs index 00e89f0fd..2fafedd47 100644 --- a/crates/ide/src/completion/complete_qualified_path.rs +++ b/crates/ide/src/completion/complete_qualified_path.rs @@ -422,10 +422,10 @@ fn foo() { let _ = U::<|> } fn completes_use_paths_across_crates() { check( r#" -//- /main.rs +//- /main.rs crate:main deps:foo use foo::<|>; -//- /foo/lib.rs +//- /foo/lib.rs crate:foo pub mod bar { pub struct S; } "#, expect![[r#" diff --git a/crates/ide/src/completion/complete_unqualified_path.rs b/crates/ide/src/completion/complete_unqualified_path.rs index 8eda4b64d..2010d9a2f 100644 --- a/crates/ide/src/completion/complete_unqualified_path.rs +++ b/crates/ide/src/completion/complete_unqualified_path.rs @@ -271,10 +271,10 @@ fn quux() { <|> } fn completes_extern_prelude() { check( r#" -//- /lib.rs +//- /lib.rs crate:main deps:other_crate use <|>; -//- /other_crate/lib.rs +//- /other_crate/lib.rs crate:other_crate // nothing here "#, expect![[r#" @@ -350,10 +350,10 @@ fn foo() { fn completes_prelude() { check( r#" -//- /main.rs +//- /main.rs crate:main deps:std fn foo() { let x: <|> } -//- /std/lib.rs +//- /std/lib.rs crate:std #[prelude_import] use prelude::*; @@ -371,16 +371,16 @@ mod prelude { struct Option; } fn completes_std_prelude_if_core_is_defined() { check( r#" -//- /main.rs +//- /main.rs crate:main deps:core,std fn foo() { let x: <|> } -//- /core/lib.rs +//- /core/lib.rs crate:core #[prelude_import] use prelude::*; mod prelude { struct Option; } -//- /std/lib.rs +//- /std/lib.rs crate:std deps:core #[prelude_import] use prelude::*; diff --git a/crates/ide/src/completion/presentation.rs b/crates/ide/src/completion/presentation.rs index 987cbfa7a..a5172b87e 100644 --- a/crates/ide/src/completion/presentation.rs +++ b/crates/ide/src/completion/presentation.rs @@ -1172,9 +1172,9 @@ fn foo(xs: Vec) check_edit( "frobnicate!", r#" -//- /main.rs +//- /main.rs crate:main deps:foo use foo::<|>; -//- /foo/lib.rs +//- /foo/lib.rs crate:foo #[macro_export] macro_rules frobnicate { () => () } "#, -- cgit v1.2.3