diff options
Diffstat (limited to 'crates/ide_completion/src')
-rw-r--r-- | crates/ide_completion/src/completions/keyword.rs | 20 | ||||
-rw-r--r-- | crates/ide_completion/src/render.rs | 12 |
2 files changed, 7 insertions, 25 deletions
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 | |||
536 | fn test_completion_await_impls_future() { | 536 | fn test_completion_await_impls_future() { |
537 | check( | 537 | check( |
538 | r#" | 538 | r#" |
539 | //- /main.rs crate:main deps:std | 539 | //- minicore: future |
540 | use std::future::*; | 540 | use core::future::*; |
541 | struct A {} | 541 | struct A {} |
542 | impl Future for A {} | 542 | impl Future for A {} |
543 | fn foo(a: A) { a.$0 } | 543 | fn foo(a: A) { a.$0 } |
544 | |||
545 | //- /std/lib.rs crate:std | ||
546 | pub mod future { | ||
547 | #[lang = "future_trait"] | ||
548 | pub trait Future {} | ||
549 | } | ||
550 | "#, | 544 | "#, |
551 | expect![[r#" | 545 | expect![[r#" |
552 | kw await expr.await | 546 | kw await expr.await |
@@ -555,20 +549,12 @@ pub mod future { | |||
555 | 549 | ||
556 | check( | 550 | check( |
557 | r#" | 551 | r#" |
558 | //- /main.rs crate:main deps:std | 552 | //- minicore: future |
559 | use std::future::*; | 553 | use std::future::*; |
560 | fn foo() { | 554 | fn foo() { |
561 | let a = async {}; | 555 | let a = async {}; |
562 | a.$0 | 556 | a.$0 |
563 | } | 557 | } |
564 | |||
565 | //- /std/lib.rs crate:std | ||
566 | pub mod future { | ||
567 | #[lang = "future_trait"] | ||
568 | pub trait Future { | ||
569 | type Output; | ||
570 | } | ||
571 | } | ||
572 | "#, | 558 | "#, |
573 | expect![[r#" | 559 | expect![[r#" |
574 | kw await expr.await | 560 | kw await expr.await |
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() { | |||
1152 | fn suggest_deref() { | 1152 | fn suggest_deref() { |
1153 | check_relevance( | 1153 | check_relevance( |
1154 | r#" | 1154 | r#" |
1155 | #[lang = "deref"] | 1155 | //- minicore: deref |
1156 | trait Deref { | ||
1157 | type Target; | ||
1158 | fn deref(&self) -> &Self::Target; | ||
1159 | } | ||
1160 | |||
1161 | struct S; | 1156 | struct S; |
1162 | struct T(S); | 1157 | struct T(S); |
1163 | 1158 | ||
1164 | impl Deref for T { | 1159 | impl core::ops::Deref for T { |
1165 | type Target = S; | 1160 | type Target = S; |
1166 | 1161 | ||
1167 | fn deref(&self) -> &Self::Target { | 1162 | fn deref(&self) -> &Self::Target { |
@@ -1185,8 +1180,9 @@ fn main() { | |||
1185 | st T [] | 1180 | st T [] |
1186 | st S [] | 1181 | st S [] |
1187 | fn main() [] | 1182 | fn main() [] |
1188 | tt Deref [] | ||
1189 | fn foo(…) [] | 1183 | fn foo(…) [] |
1184 | md core [] | ||
1185 | tt Sized [] | ||
1190 | "#]], | 1186 | "#]], |
1191 | ) | 1187 | ) |
1192 | } | 1188 | } |