diff options
author | Aleksey Kladov <[email protected]> | 2018-10-15 18:15:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-15 18:15:53 +0100 |
commit | bb298158ebc7fc62cad1654c76dc582e6dc28f05 (patch) | |
tree | 81bbbabcc118687d72fa3a32ae59ab3bd02c8a9e /crates/ra_analysis/src/db | |
parent | 2dd6858d03dd9c3f6dced3cc5c33ef3ab9d09157 (diff) |
migrate analysis and server to 2018
Diffstat (limited to 'crates/ra_analysis/src/db')
-rw-r--r-- | crates/ra_analysis/src/db/imp.rs | 4 | ||||
-rw-r--r-- | crates/ra_analysis/src/db/mod.rs | 6 |
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 | }; |
8 | use rustc_hash::FxHashMap; | 8 | use rustc_hash::FxHashMap; |
9 | use salsa; | 9 | use salsa; |
10 | use {FileId, imp::FileResolverImp}; | 10 | use crate::{FileId, imp::FileResolverImp}; |
11 | use super::{State, Query, QueryCtx}; | 11 | use super::{State, Query, QueryCtx}; |
12 | 12 | ||
13 | pub(super) type Data = Arc<Any + Send + Sync + 'static>; | 13 | pub(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 | ||
57 | impl<T, R> EvalQuery for Query<T, R> | 57 | impl<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 | }; |
6 | use im; | 6 | use im; |
7 | use salsa; | 7 | use salsa; |
8 | use {FileId, imp::FileResolverImp}; | 8 | use crate::{FileId, imp::FileResolverImp}; |
9 | 9 | ||
10 | #[derive(Debug, Default, Clone)] | 10 | #[derive(Debug, Default, Clone)] |
11 | pub(crate) struct State { | 11 | pub(crate) struct State { |
@@ -75,8 +75,8 @@ pub(crate) fn file_set(ctx: QueryCtx) -> Arc<(Vec<FileId>, FileResolverImp)> { | |||
75 | impl QueryRegistry { | 75 | impl 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) { |