From 89a0e58393de0ae39fc1f33a33cec87bc084a9f1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 18 Jun 2021 22:47:02 +0300 Subject: internal: use minicore deref more --- crates/ide_completion/src/render.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'crates/ide_completion') diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index 4b55f7504..9bec03e17 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs @@ -1269,16 +1269,11 @@ fn bar(t: &Foo) {} fn suggest_deref_fn_ret() { 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 { @@ -1292,15 +1287,16 @@ fn bar() -> T {} fn main() { foo($0); } - "#, +"#, expect![[r#" - tt Deref [] - fn bar() [] - fn &bar() [type] - fn foo(…) [] st T [] st S [] fn main() [] + fn bar() [] + fn &bar() [type] + fn foo(…) [] + md core [] + tt Sized [] "#]], ) } -- cgit v1.2.3