aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-18 20:47:02 +0100
committerAleksey Kladov <[email protected]>2021-06-18 20:47:02 +0100
commit89a0e58393de0ae39fc1f33a33cec87bc084a9f1 (patch)
tree2ab97438a45f9dc6cf72d42209923df19aa5d789 /crates/ide_completion
parent991919e71f048f9321e702512248e11c6c5fef70 (diff)
internal: use minicore deref more
Diffstat (limited to 'crates/ide_completion')
-rw-r--r--crates/ide_completion/src/render.rs20
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
1273trait Deref {
1274 type Target;
1275 fn deref(&self) -> &Self::Target;
1276}
1277
1278struct S; 1273struct S;
1279struct T(S); 1274struct T(S);
1280 1275
1281impl Deref for T { 1276impl 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 {}
1292fn main() { 1287fn 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 }