From 7cbcbccc7888b9a515cbebe2cd20fd3eebec463b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jun 2021 23:11:53 +0300 Subject: internal: switch some tests to minicore --- crates/ide/src/hover.rs | 15 +++++---------- crates/ide_completion/src/render.rs | 12 ++++-------- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'crates') diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index afeded315..14cf94d60 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -3000,29 +3000,24 @@ fn foo(ar$0g: &impl Foo + Bar) {} fn test_hover_async_block_impl_trait_has_goto_type_action() { check_actions( r#" +//- minicore: future struct S; fn foo() { let fo$0o = async { S }; } - -#[prelude_import] use future::*; -mod future { - #[lang = "future_trait"] - pub trait Future { type Output; } -} "#, expect![[r#" [ GoToType( [ HoverGotoTypeData { - mod_path: "test::future::Future", + mod_path: "core::future::Future", nav: NavigationTarget { file_id: FileId( - 0, + 1, ), - full_range: 101..163, - focus_range: 140..146, + full_range: 244..426, + focus_range: 283..289, name: "Future", kind: Trait, description: "pub trait Future", diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index d8ca18c73..3eb51e80b 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs @@ -1152,16 +1152,11 @@ fn main() { fn suggest_deref() { check_relevance( r#" -#[lang = "deref"] -trait Deref { - type Target; - fn deref(&self) -> &Self::Target; -} - +//- minicore: deref struct S; struct T(S); -impl Deref for T { +impl core::ops::Deref for T { type Target = S; fn deref(&self) -> &Self::Target { @@ -1185,8 +1180,9 @@ fn main() { st T [] st S [] fn main() [] - tt Deref [] fn foo(…) [] + md core [] + tt Sized [] "#]], ) } -- cgit v1.2.3