aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-11 10:30:06 +0100
committerAleksey Kladov <[email protected]>2020-06-11 10:30:06 +0100
commitd8a5d39c2d05fb59b6c243935111714e18334599 (patch)
tree9fed314df9599ba26df698c1d38a4d727f21481d /crates/ra_hir_expand/src/lib.rs
parentf632727b2ab985a9c5ceca781d033a08ee3822ea (diff)
Make relevant_crates return a Set
Diffstat (limited to 'crates/ra_hir_expand/src/lib.rs')
-rw-r--r--crates/ra_hir_expand/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs
index f440c073b..dc4d7f000 100644
--- a/crates/ra_hir_expand/src/lib.rs
+++ b/crates/ra_hir_expand/src/lib.rs
@@ -424,3 +424,8 @@ impl<N: AstNode> InFile<N> {
424 self.with_value(self.value.syntax()) 424 self.with_value(self.value.syntax())
425 } 425 }
426} 426}
427
428// FIXME: this is obviously wrong, there shouldn't be any guesing here
429fn guess_crate(db: &dyn db::AstDatabase, file_id: FileId) -> Option<CrateId> {
430 db.relevant_crates(file_id).iter().next().copied()
431}