aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-15 18:15:53 +0100
committerAleksey Kladov <[email protected]>2018-10-15 18:15:53 +0100
commitbb298158ebc7fc62cad1654c76dc582e6dc28f05 (patch)
tree81bbbabcc118687d72fa3a32ae59ab3bd02c8a9e /crates/ra_analysis/src/db
parent2dd6858d03dd9c3f6dced3cc5c33ef3ab9d09157 (diff)
migrate analysis and server to 2018
Diffstat (limited to 'crates/ra_analysis/src/db')
-rw-r--r--crates/ra_analysis/src/db/imp.rs4
-rw-r--r--crates/ra_analysis/src/db/mod.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/db/imp.rs b/crates/ra_analysis/src/db/imp.rs
index 36f6cf290..7669b6184 100644
--- a/crates/ra_analysis/src/db/imp.rs
+++ b/crates/ra_analysis/src/db/imp.rs
@@ -7,7 +7,7 @@ use std::{
7}; 7};
8use rustc_hash::FxHashMap; 8use rustc_hash::FxHashMap;
9use salsa; 9use salsa;
10use {FileId, imp::FileResolverImp}; 10use crate::{FileId, imp::FileResolverImp};
11use super::{State, Query, QueryCtx}; 11use super::{State, Query, QueryCtx};
12 12
13pub(super) type Data = Arc<Any + Send + Sync + 'static>; 13pub(super) type Data = Arc<Any + Send + Sync + 'static>;
@@ -51,7 +51,7 @@ pub(crate) trait EvalQuery {
51 type Output; 51 type Output;
52 fn query_type(&self) -> salsa::QueryTypeId; 52 fn query_type(&self) -> salsa::QueryTypeId;
53 fn f(&self) -> salsa::QueryFn<State, Data>; 53 fn f(&self) -> salsa::QueryFn<State, Data>;
54 fn get(&self, &QueryCtx, Self::Params) -> Arc<Self::Output>; 54 fn get(&self, ctx: &QueryCtx, params: Self::Params) -> Arc<Self::Output>;
55} 55}
56 56
57impl<T, R> EvalQuery for Query<T, R> 57impl<T, R> EvalQuery for Query<T, R>
diff --git a/crates/ra_analysis/src/db/mod.rs b/crates/ra_analysis/src/db/mod.rs
index 22769d112..4eb7d922d 100644
--- a/crates/ra_analysis/src/db/mod.rs
+++ b/crates/ra_analysis/src/db/mod.rs
@@ -5,7 +5,7 @@ use std::{
5}; 5};
6use im; 6use im;
7use salsa; 7use salsa;
8use {FileId, imp::FileResolverImp}; 8use crate::{FileId, imp::FileResolverImp};
9 9
10#[derive(Debug, Default, Clone)] 10#[derive(Debug, Default, Clone)]
11pub(crate) struct State { 11pub(crate) struct State {
@@ -75,8 +75,8 @@ pub(crate) fn file_set(ctx: QueryCtx) -> Arc<(Vec<FileId>, FileResolverImp)> {
75impl QueryRegistry { 75impl QueryRegistry {
76 fn new() -> QueryRegistry { 76 fn new() -> QueryRegistry {
77 let mut reg = QueryRegistry { imp: imp::QueryRegistry::new() }; 77 let mut reg = QueryRegistry { imp: imp::QueryRegistry::new() };
78 ::queries::register_queries(&mut reg); 78 crate::queries::register_queries(&mut reg);
79 ::module_map::register_queries(&mut reg); 79 crate::module_map::register_queries(&mut reg);
80 reg 80 reg
81 } 81 }
82 pub(crate) fn add<Q: imp::EvalQuery>(&mut self, q: Q, name: &'static str) { 82 pub(crate) fn add<Q: imp::EvalQuery>(&mut self, q: Q, name: &'static str) {