aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-15 16:43:46 +0000
committerLukas Wirth <[email protected]>2021-03-15 17:28:31 +0000
commite97cd709cd91ccfafbd45bab8b2bf01f3ddf6a04 (patch)
treebb6e1bcfae7fd44a7a63be31a17dc6e68799e7d5 /crates/ide
parenteec64ec01b0553aca855df8146965ed6c6746e7d (diff)
Implement Crate::transitive_reverse_dependencies
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 ec7c7686d..fc85cd0ce 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -1270,4 +1270,27 @@ fn foo(_: bool) -> bo$0ol { true }
1270 "#]], 1270 "#]],
1271 ); 1271 );
1272 } 1272 }
1273
1274 #[test]
1275 fn test_transitive() {
1276 check(
1277 r#"
1278//- /level3/level3.rs crate:level3
1279pub struct Fo$0o;
1280//- /level2/level2.rs crate:level2 deps:level3
1281pub use level3::Foo;
1282//- /level1/level1.rs crate:level1 deps:level2
1283pub use level2::Foo;
1284//- /level0/level0.rs crate:level0 deps:level1
1285pub use level1::Foo;
1286"#,
1287 expect![[r#"
1288 Foo Struct FileId(0) 0..15 11..14
1289
1290 FileId(1) 16..19
1291 FileId(2) 16..19
1292 FileId(3) 16..19
1293 "#]],
1294 );
1295 }
1273} 1296}