diff options
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/render.rs | 20 |
1 files changed, 8 insertions, 12 deletions
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) {} | |||
1269 | fn suggest_deref_fn_ret() { | 1269 | fn suggest_deref_fn_ret() { |
1270 | check_relevance( | 1270 | check_relevance( |
1271 | r#" | 1271 | r#" |
1272 | #[lang = "deref"] | 1272 | //- minicore: deref |
1273 | trait Deref { | ||
1274 | type Target; | ||
1275 | fn deref(&self) -> &Self::Target; | ||
1276 | } | ||
1277 | |||
1278 | struct S; | 1273 | struct S; |
1279 | struct T(S); | 1274 | struct T(S); |
1280 | 1275 | ||
1281 | impl Deref for T { | 1276 | impl core::ops::Deref for T { |
1282 | type Target = S; | 1277 | type Target = S; |
1283 | 1278 | ||
1284 | fn deref(&self) -> &Self::Target { | 1279 | fn deref(&self) -> &Self::Target { |
@@ -1292,15 +1287,16 @@ fn bar() -> T {} | |||
1292 | fn main() { | 1287 | fn main() { |
1293 | foo($0); | 1288 | foo($0); |
1294 | } | 1289 | } |
1295 | "#, | 1290 | "#, |
1296 | expect![[r#" | 1291 | expect![[r#" |
1297 | tt Deref [] | ||
1298 | fn bar() [] | ||
1299 | fn &bar() [type] | ||
1300 | fn foo(…) [] | ||
1301 | st T [] | 1292 | st T [] |
1302 | st S [] | 1293 | st S [] |
1303 | fn main() [] | 1294 | fn main() [] |
1295 | fn bar() [] | ||
1296 | fn &bar() [type] | ||
1297 | fn foo(…) [] | ||
1298 | md core [] | ||
1299 | tt Sized [] | ||
1304 | "#]], | 1300 | "#]], |
1305 | ) | 1301 | ) |
1306 | } | 1302 | } |