aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-16 14:54:12 +0000
committerGitHub <[email protected]>2021-03-16 14:54:12 +0000
commit979e788957ced1957ee9ac1da70fb97abf9fe2b1 (patch)
tree1777ab043cb0750854b27a8aec805454de5c3277 /crates/ide
parentb4ed3e1551f828d44dcd8e0caf08420438e5eb1a (diff)
parentbebee2106de7bbd20f54d7f55d5c56dba0d636b6 (diff)
Merge #8034
8034: Implement Crate::transitive_reverse_dependencies r=matklad a=Veykril changelog internal Implement Crate::transitive_reverse_dependencies Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/references.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index e8a5666bc..379674530 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -1271,4 +1271,27 @@ fn foo(_: bool) -> bo$0ol { true }
1271 "#]], 1271 "#]],
1272 ); 1272 );
1273 } 1273 }
1274
1275 #[test]
1276 fn test_transitive() {
1277 check(
1278 r#"
1279//- /level3.rs new_source_root: crate:level3
1280pub struct Fo$0o;
1281//- /level2.rs new_source_root: crate:level2 deps:level3
1282pub use level3::Foo;
1283//- /level1.rs new_source_root: crate:level1 deps:level2
1284pub use level2::Foo;
1285//- /level0.rs new_source_root: crate:level0 deps:level1
1286pub use level1::Foo;
1287"#,
1288 expect![[r#"
1289 Foo Struct FileId(0) 0..15 11..14
1290
1291 FileId(1) 16..19
1292 FileId(2) 16..19
1293 FileId(3) 16..19
1294 "#]],
1295 );
1296 }
1274} 1297}