diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 57657105b..efb3182a6 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -84,7 +84,7 @@ impl Default for FileResolverImp { | |||
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | #[derive(Debug, Default)] | 87 | #[derive(Debug)] |
88 | pub(crate) struct AnalysisHostImpl { | 88 | pub(crate) struct AnalysisHostImpl { |
89 | db: db::RootDatabase, | 89 | db: db::RootDatabase, |
90 | } | 90 | } |
@@ -92,7 +92,12 @@ pub(crate) struct AnalysisHostImpl { | |||
92 | 92 | ||
93 | impl AnalysisHostImpl { | 93 | impl AnalysisHostImpl { |
94 | pub fn new() -> AnalysisHostImpl { | 94 | pub fn new() -> AnalysisHostImpl { |
95 | AnalysisHostImpl::default() | 95 | let db = db::RootDatabase::default(); |
96 | db.query(crate::input::SourceRootQuery) | ||
97 | .set(WORKSPACE, Default::default()); | ||
98 | db.query(crate::input::CrateGraphQuery) | ||
99 | .set((), Default::default()); | ||
100 | AnalysisHostImpl { db } | ||
96 | } | 101 | } |
97 | pub fn analysis(&self) -> AnalysisImpl { | 102 | pub fn analysis(&self) -> AnalysisImpl { |
98 | AnalysisImpl { | 103 | AnalysisImpl { |