diff options
-rw-r--r-- | crates/ide/src/hover.rs | 15 | ||||
-rw-r--r-- | crates/ide_completion/src/render.rs | 12 |
2 files changed, 9 insertions, 18 deletions
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<S>) {} | |||
3000 | fn test_hover_async_block_impl_trait_has_goto_type_action() { | 3000 | fn test_hover_async_block_impl_trait_has_goto_type_action() { |
3001 | check_actions( | 3001 | check_actions( |
3002 | r#" | 3002 | r#" |
3003 | //- minicore: future | ||
3003 | struct S; | 3004 | struct S; |
3004 | fn foo() { | 3005 | fn foo() { |
3005 | let fo$0o = async { S }; | 3006 | let fo$0o = async { S }; |
3006 | } | 3007 | } |
3007 | |||
3008 | #[prelude_import] use future::*; | ||
3009 | mod future { | ||
3010 | #[lang = "future_trait"] | ||
3011 | pub trait Future { type Output; } | ||
3012 | } | ||
3013 | "#, | 3008 | "#, |
3014 | expect![[r#" | 3009 | expect![[r#" |
3015 | [ | 3010 | [ |
3016 | GoToType( | 3011 | GoToType( |
3017 | [ | 3012 | [ |
3018 | HoverGotoTypeData { | 3013 | HoverGotoTypeData { |
3019 | mod_path: "test::future::Future", | 3014 | mod_path: "core::future::Future", |
3020 | nav: NavigationTarget { | 3015 | nav: NavigationTarget { |
3021 | file_id: FileId( | 3016 | file_id: FileId( |
3022 | 0, | 3017 | 1, |
3023 | ), | 3018 | ), |
3024 | full_range: 101..163, | 3019 | full_range: 244..426, |
3025 | focus_range: 140..146, | 3020 | focus_range: 283..289, |
3026 | name: "Future", | 3021 | name: "Future", |
3027 | kind: Trait, | 3022 | kind: Trait, |
3028 | description: "pub trait Future", | 3023 | 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() { | |||
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 | } |