From ae92057df6608f6ab48317198a9d13a97f07f004 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jun 2021 23:02:38 +0300 Subject: internal: switch some tests to minicore --- crates/ide_completion/src/completions/keyword.rs | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'crates/ide_completion/src') diff --git a/crates/ide_completion/src/completions/keyword.rs b/crates/ide_completion/src/completions/keyword.rs index ba13d3707..0fccbeccf 100644 --- a/crates/ide_completion/src/completions/keyword.rs +++ b/crates/ide_completion/src/completions/keyword.rs @@ -536,17 +536,11 @@ Some multi-line comment$0 fn test_completion_await_impls_future() { check( r#" -//- /main.rs crate:main deps:std -use std::future::*; +//- minicore: future +use core::future::*; struct A {} impl Future for A {} fn foo(a: A) { a.$0 } - -//- /std/lib.rs crate:std -pub mod future { - #[lang = "future_trait"] - pub trait Future {} -} "#, expect![[r#" kw await expr.await @@ -555,20 +549,12 @@ pub mod future { check( r#" -//- /main.rs crate:main deps:std +//- minicore: future use std::future::*; fn foo() { let a = async {}; a.$0 } - -//- /std/lib.rs crate:std -pub mod future { - #[lang = "future_trait"] - pub trait Future { - type Output; - } -} "#, expect![[r#" kw await expr.await -- cgit v1.2.3 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_completion/src/render.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crates/ide_completion/src') 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