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 | |
parent | 2dd6858d03dd9c3f6dced3cc5c33ef3ab9d09157 (diff) |
migrate analysis and server to 2018
Diffstat (limited to 'crates')
21 files changed, 42 insertions, 36 deletions
diff --git a/crates/ra_analysis/Cargo.toml b/crates/ra_analysis/Cargo.toml index a82e1761c..28d95c581 100644 --- a/crates/ra_analysis/Cargo.toml +++ b/crates/ra_analysis/Cargo.toml | |||
@@ -1,4 +1,5 @@ | |||
1 | [package] | 1 | [package] |
2 | edition = "2018" | ||
2 | name = "ra_analysis" | 3 | name = "ra_analysis" |
3 | version = "0.1.0" | 4 | version = "0.1.0" |
4 | authors = ["Aleksey Kladov <[email protected]>"] | 5 | authors = ["Aleksey Kladov <[email protected]>"] |
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) { |
diff --git a/crates/ra_analysis/src/descriptors.rs b/crates/ra_analysis/src/descriptors.rs index faf945a41..f26dac875 100644 --- a/crates/ra_analysis/src/descriptors.rs +++ b/crates/ra_analysis/src/descriptors.rs | |||
@@ -7,7 +7,7 @@ use ra_syntax::{ | |||
7 | ast::{self, NameOwner, AstNode}, | 7 | ast::{self, NameOwner, AstNode}, |
8 | text_utils::is_subrange | 8 | text_utils::is_subrange |
9 | }; | 9 | }; |
10 | use { | 10 | use crate::{ |
11 | FileId, | 11 | FileId, |
12 | imp::FileResolverImp, | 12 | imp::FileResolverImp, |
13 | }; | 13 | }; |
@@ -271,4 +271,4 @@ impl FnDescriptor { | |||
271 | } | 271 | } |
272 | res | 272 | res |
273 | } | 273 | } |
274 | } \ No newline at end of file | 274 | } |
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index aad54b977..26f5e175b 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -17,7 +17,7 @@ use ra_syntax::{ | |||
17 | ast::{self, NameOwner, ArgListOwner, Expr}, | 17 | ast::{self, NameOwner, ArgListOwner, Expr}, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | use { | 20 | use crate::{ |
21 | FileId, FileResolver, Query, Diagnostic, SourceChange, SourceFileEdit, Position, FileSystemEdit, | 21 | FileId, FileResolver, Query, Diagnostic, SourceChange, SourceFileEdit, Position, FileSystemEdit, |
22 | JobToken, CrateGraph, CrateId, | 22 | JobToken, CrateGraph, CrateId, |
23 | roots::{SourceRoot, ReadonlySourceRoot, WritableSourceRoot}, | 23 | roots::{SourceRoot, ReadonlySourceRoot, WritableSourceRoot}, |
@@ -458,4 +458,4 @@ impl<'a> FnCallNode<'a> { | |||
458 | FnCallNode::MethodCallExpr(expr) => expr.arg_list() | 458 | FnCallNode::MethodCallExpr(expr) => expr.arg_list() |
459 | } | 459 | } |
460 | } | 460 | } |
461 | } \ No newline at end of file | 461 | } |
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index 1aca72ae0..86c66236c 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -29,16 +29,18 @@ use std::{ | |||
29 | 29 | ||
30 | use relative_path::{RelativePath, RelativePathBuf}; | 30 | use relative_path::{RelativePath, RelativePathBuf}; |
31 | use ra_syntax::{File, TextRange, TextUnit, AtomEdit}; | 31 | use ra_syntax::{File, TextRange, TextUnit, AtomEdit}; |
32 | use imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp}; | ||
33 | use rustc_hash::FxHashMap; | 32 | use rustc_hash::FxHashMap; |
33 | use crate::imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp}; | ||
34 | 34 | ||
35 | pub use ra_editor::{ | 35 | pub use ra_editor::{ |
36 | StructureNode, LineIndex, FileSymbol, | 36 | StructureNode, LineIndex, FileSymbol, |
37 | Runnable, RunnableKind, HighlightedRange, CompletionItem, | 37 | Runnable, RunnableKind, HighlightedRange, CompletionItem, |
38 | Fold, FoldKind | 38 | Fold, FoldKind |
39 | }; | 39 | }; |
40 | pub use job::{JobToken, JobHandle}; | 40 | pub use crate::{ |
41 | pub use descriptors::FnDescriptor; | 41 | job::{JobToken, JobHandle}, |
42 | descriptors::FnDescriptor, | ||
43 | }; | ||
42 | 44 | ||
43 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 45 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
44 | pub struct FileId(pub u32); | 46 | pub struct FileId(pub u32); |
diff --git a/crates/ra_analysis/src/module_map.rs b/crates/ra_analysis/src/module_map.rs index a21f55fff..c77c5cec6 100644 --- a/crates/ra_analysis/src/module_map.rs +++ b/crates/ra_analysis/src/module_map.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | use { | 2 | use crate::{ |
3 | FileId, | 3 | FileId, |
4 | db::{ | 4 | db::{ |
5 | Query, QueryRegistry, QueryCtx, | 5 | Query, QueryRegistry, QueryCtx, |
@@ -38,7 +38,7 @@ mod tests { | |||
38 | use std::collections::HashMap; | 38 | use std::collections::HashMap; |
39 | use im; | 39 | use im; |
40 | use relative_path::{RelativePath, RelativePathBuf}; | 40 | use relative_path::{RelativePath, RelativePathBuf}; |
41 | use { | 41 | use crate::{ |
42 | db::{Db}, | 42 | db::{Db}, |
43 | imp::FileResolverImp, | 43 | imp::FileResolverImp, |
44 | FileId, FileResolver, | 44 | FileId, FileResolver, |
diff --git a/crates/ra_analysis/src/queries.rs b/crates/ra_analysis/src/queries.rs index 062a2f420..613bf1e61 100644 --- a/crates/ra_analysis/src/queries.rs +++ b/crates/ra_analysis/src/queries.rs | |||
@@ -1,13 +1,13 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | use ra_syntax::File; | 2 | use ra_syntax::File; |
3 | use ra_editor::LineIndex; | 3 | use ra_editor::LineIndex; |
4 | use { | 4 | use crate::{ |
5 | FileId, | 5 | FileId, |
6 | db::{Query, QueryCtx, QueryRegistry}, | 6 | db::{Query, QueryCtx, QueryRegistry}, |
7 | symbol_index::SymbolIndex, | 7 | symbol_index::SymbolIndex, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | pub(crate) use db::{file_text, file_set}; | 10 | pub(crate) use crate::db::{file_text, file_set}; |
11 | 11 | ||
12 | pub(crate) fn file_syntax(ctx: QueryCtx, file_id: FileId) -> File { | 12 | pub(crate) fn file_syntax(ctx: QueryCtx, file_id: FileId) -> File { |
13 | (&*ctx.get(FILE_SYNTAX, file_id)).clone() | 13 | (&*ctx.get(FILE_SYNTAX, file_id)).clone() |
diff --git a/crates/ra_analysis/src/roots.rs b/crates/ra_analysis/src/roots.rs index 32a8c5bd0..208acc4c2 100644 --- a/crates/ra_analysis/src/roots.rs +++ b/crates/ra_analysis/src/roots.rs | |||
@@ -9,7 +9,7 @@ use rustc_hash::FxHashMap; | |||
9 | use ra_editor::LineIndex; | 9 | use ra_editor::LineIndex; |
10 | use ra_syntax::File; | 10 | use ra_syntax::File; |
11 | 11 | ||
12 | use { | 12 | use crate::{ |
13 | FileId, | 13 | FileId, |
14 | imp::FileResolverImp, | 14 | imp::FileResolverImp, |
15 | symbol_index::SymbolIndex, | 15 | symbol_index::SymbolIndex, |
@@ -62,23 +62,23 @@ impl WritableSourceRoot { | |||
62 | 62 | ||
63 | impl SourceRoot for WritableSourceRoot { | 63 | impl SourceRoot for WritableSourceRoot { |
64 | fn module_tree(&self) -> Arc<ModuleTreeDescriptor> { | 64 | fn module_tree(&self) -> Arc<ModuleTreeDescriptor> { |
65 | self.db.make_query(::module_map::module_tree) | 65 | self.db.make_query(crate::module_map::module_tree) |
66 | } | 66 | } |
67 | 67 | ||
68 | fn contains(&self, file_id: FileId) -> bool { | 68 | fn contains(&self, file_id: FileId) -> bool { |
69 | self.db.state().file_map.contains_key(&file_id) | 69 | self.db.state().file_map.contains_key(&file_id) |
70 | } | 70 | } |
71 | fn lines(&self, file_id: FileId) -> Arc<LineIndex> { | 71 | fn lines(&self, file_id: FileId) -> Arc<LineIndex> { |
72 | self.db.make_query(|ctx| ::queries::file_lines(ctx, file_id)) | 72 | self.db.make_query(|ctx| crate::queries::file_lines(ctx, file_id)) |
73 | } | 73 | } |
74 | fn syntax(&self, file_id: FileId) -> File { | 74 | fn syntax(&self, file_id: FileId) -> File { |
75 | self.db.make_query(|ctx| ::queries::file_syntax(ctx, file_id)) | 75 | self.db.make_query(|ctx| crate::queries::file_syntax(ctx, file_id)) |
76 | } | 76 | } |
77 | fn symbols<'a>(&'a self, acc: &mut Vec<Arc<SymbolIndex>>) { | 77 | fn symbols<'a>(&'a self, acc: &mut Vec<Arc<SymbolIndex>>) { |
78 | self.db.make_query(|ctx| { | 78 | self.db.make_query(|ctx| { |
79 | let file_set = ::queries::file_set(ctx); | 79 | let file_set = crate::queries::file_set(ctx); |
80 | let syms = file_set.0.iter() | 80 | let syms = file_set.0.iter() |
81 | .map(|file_id| ::queries::file_symbols(ctx, *file_id)); | 81 | .map(|file_id| crate::queries::file_symbols(ctx, *file_id)); |
82 | acc.extend(syms); | 82 | acc.extend(syms); |
83 | }); | 83 | }); |
84 | } | 84 | } |
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index ffbb6a29f..e5d83d365 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs | |||
@@ -9,7 +9,7 @@ use ra_syntax::{ | |||
9 | }; | 9 | }; |
10 | use fst::{self, Streamer}; | 10 | use fst::{self, Streamer}; |
11 | use rayon::prelude::*; | 11 | use rayon::prelude::*; |
12 | use {Query, FileId, JobToken}; | 12 | use crate::{Query, FileId, JobToken}; |
13 | 13 | ||
14 | #[derive(Debug)] | 14 | #[derive(Debug)] |
15 | pub(crate) struct SymbolIndex { | 15 | pub(crate) struct SymbolIndex { |
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml index 1fe6b2ebe..2b3257117 100644 --- a/crates/ra_lsp_server/Cargo.toml +++ b/crates/ra_lsp_server/Cargo.toml | |||
@@ -1,4 +1,5 @@ | |||
1 | [package] | 1 | [package] |
2 | edition = "2018" | ||
2 | name = "ra_lsp_server" | 3 | name = "ra_lsp_server" |
3 | version = "0.1.0" | 4 | version = "0.1.0" |
4 | authors = ["Aleksey Kladov <[email protected]>"] | 5 | authors = ["Aleksey Kladov <[email protected]>"] |
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 08a656569..a75b160c5 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -7,7 +7,7 @@ use ra_editor::{LineIndex, LineCol, Edit, AtomEdit}; | |||
7 | use ra_syntax::{SyntaxKind, TextUnit, TextRange}; | 7 | use ra_syntax::{SyntaxKind, TextUnit, TextRange}; |
8 | use ra_analysis::{FileId, SourceChange, SourceFileEdit, FileSystemEdit}; | 8 | use ra_analysis::{FileId, SourceChange, SourceFileEdit, FileSystemEdit}; |
9 | 9 | ||
10 | use { | 10 | use crate::{ |
11 | Result, | 11 | Result, |
12 | server_world::ServerWorld, | 12 | server_world::ServerWorld, |
13 | req, | 13 | req, |
@@ -299,7 +299,7 @@ pub fn to_location( | |||
299 | Ok(loc) | 299 | Ok(loc) |
300 | } | 300 | } |
301 | 301 | ||
302 | pub trait MapConvWith<'a>: Sized { | 302 | pub trait MapConvWith<'a>: Sized + 'a { |
303 | type Ctx; | 303 | type Ctx; |
304 | type Output; | 304 | type Output; |
305 | 305 | ||
@@ -309,7 +309,7 @@ pub trait MapConvWith<'a>: Sized { | |||
309 | } | 309 | } |
310 | 310 | ||
311 | impl<'a, I> MapConvWith<'a> for I | 311 | impl<'a, I> MapConvWith<'a> for I |
312 | where I: Iterator, | 312 | where I: Iterator + 'a, |
313 | I::Item: ConvWith | 313 | I::Item: ConvWith |
314 | { | 314 | { |
315 | type Ctx = <I::Item as ConvWith>::Ctx; | 315 | type Ctx = <I::Item as ConvWith>::Ctx; |
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/ra_lsp_server/src/lib.rs index 60652d55e..7224b1476 100644 --- a/crates/ra_lsp_server/src/lib.rs +++ b/crates/ra_lsp_server/src/lib.rs | |||
@@ -34,5 +34,7 @@ mod project_model; | |||
34 | pub mod thread_watcher; | 34 | pub mod thread_watcher; |
35 | 35 | ||
36 | pub type Result<T> = ::std::result::Result<T, ::failure::Error>; | 36 | pub type Result<T> = ::std::result::Result<T, ::failure::Error>; |
37 | pub use caps::server_capabilities; | 37 | pub use crate::{ |
38 | pub use main_loop::main_loop; | 38 | main_loop::main_loop, |
39 | caps::server_capabilities, | ||
40 | }; | ||
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index f65e2a889..1fe78f3d0 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -13,7 +13,7 @@ use ra_syntax::{ | |||
13 | text_utils::contains_offset_nonstrict | 13 | text_utils::contains_offset_nonstrict |
14 | }; | 14 | }; |
15 | 15 | ||
16 | use ::{ | 16 | use crate::{ |
17 | req::{self, Decoration}, Result, | 17 | req::{self, Decoration}, Result, |
18 | conv::{Conv, ConvWith, TryConvWith, MapConvWith, to_location}, | 18 | conv::{Conv, ConvWith, TryConvWith, MapConvWith, to_location}, |
19 | server_world::ServerWorld, | 19 | server_world::ServerWorld, |
diff --git a/crates/ra_lsp_server/src/main_loop/mod.rs b/crates/ra_lsp_server/src/main_loop/mod.rs index f4e7cfc33..773501efe 100644 --- a/crates/ra_lsp_server/src/main_loop/mod.rs +++ b/crates/ra_lsp_server/src/main_loop/mod.rs | |||
@@ -16,7 +16,7 @@ use gen_lsp_server::{ | |||
16 | }; | 16 | }; |
17 | use rustc_hash::FxHashMap; | 17 | use rustc_hash::FxHashMap; |
18 | 18 | ||
19 | use { | 19 | use crate::{ |
20 | req, | 20 | req, |
21 | Result, | 21 | Result, |
22 | vfs::{self, FileEvent}, | 22 | vfs::{self, FileEvent}, |
diff --git a/crates/ra_lsp_server/src/project_model.rs b/crates/ra_lsp_server/src/project_model.rs index 43e4fd654..c144d9596 100644 --- a/crates/ra_lsp_server/src/project_model.rs +++ b/crates/ra_lsp_server/src/project_model.rs | |||
@@ -5,7 +5,7 @@ use rustc_hash::{FxHashMap, FxHashSet}; | |||
5 | use cargo_metadata::{metadata_run, CargoOpt}; | 5 | use cargo_metadata::{metadata_run, CargoOpt}; |
6 | use ra_syntax::SmolStr; | 6 | use ra_syntax::SmolStr; |
7 | 7 | ||
8 | use { | 8 | use crate::{ |
9 | Result, | 9 | Result, |
10 | thread_watcher::{Worker, ThreadWatcher}, | 10 | thread_watcher::{Worker, ThreadWatcher}, |
11 | }; | 11 | }; |
diff --git a/crates/ra_lsp_server/src/server_world.rs b/crates/ra_lsp_server/src/server_world.rs index c4cdf83d4..c931afa02 100644 --- a/crates/ra_lsp_server/src/server_world.rs +++ b/crates/ra_lsp_server/src/server_world.rs | |||
@@ -8,7 +8,7 @@ use rustc_hash::FxHashMap; | |||
8 | use languageserver_types::Url; | 8 | use languageserver_types::Url; |
9 | use ra_analysis::{FileId, AnalysisHost, Analysis, CrateGraph, CrateId, LibraryData, FileResolver}; | 9 | use ra_analysis::{FileId, AnalysisHost, Analysis, CrateGraph, CrateId, LibraryData, FileResolver}; |
10 | 10 | ||
11 | use { | 11 | use crate::{ |
12 | Result, | 12 | Result, |
13 | path_map::{PathMap, Root}, | 13 | path_map::{PathMap, Root}, |
14 | vfs::{FileEvent, FileEventKind}, | 14 | vfs::{FileEvent, FileEventKind}, |
diff --git a/crates/ra_lsp_server/src/thread_watcher.rs b/crates/ra_lsp_server/src/thread_watcher.rs index 86a3a91e0..3257effcb 100644 --- a/crates/ra_lsp_server/src/thread_watcher.rs +++ b/crates/ra_lsp_server/src/thread_watcher.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::thread; | 1 | use std::thread; |
2 | use crossbeam_channel::{bounded, unbounded, Sender, Receiver}; | 2 | use crossbeam_channel::{bounded, unbounded, Sender, Receiver}; |
3 | use drop_bomb::DropBomb; | 3 | use drop_bomb::DropBomb; |
4 | use Result; | 4 | use crate::Result; |
5 | 5 | ||
6 | pub struct Worker<I, O> { | 6 | pub struct Worker<I, O> { |
7 | pub inp: Sender<I>, | 7 | pub inp: Sender<I>, |
diff --git a/crates/ra_lsp_server/src/vfs.rs b/crates/ra_lsp_server/src/vfs.rs index a1c1783f2..d8f9b1aac 100644 --- a/crates/ra_lsp_server/src/vfs.rs +++ b/crates/ra_lsp_server/src/vfs.rs | |||
@@ -5,7 +5,7 @@ use std::{ | |||
5 | 5 | ||
6 | use walkdir::WalkDir; | 6 | use walkdir::WalkDir; |
7 | 7 | ||
8 | use { | 8 | use crate::{ |
9 | thread_watcher::{Worker, ThreadWatcher}, | 9 | thread_watcher::{Worker, ThreadWatcher}, |
10 | }; | 10 | }; |
11 | 11 | ||
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index dced45f55..7265b5999 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs | |||
@@ -12,7 +12,7 @@ mod support; | |||
12 | 12 | ||
13 | use ra_lsp_server::req::{Runnables, RunnablesParams}; | 13 | use ra_lsp_server::req::{Runnables, RunnablesParams}; |
14 | 14 | ||
15 | use support::project; | 15 | use crate::support::project; |
16 | 16 | ||
17 | 17 | ||
18 | const LOG: &'static str = ""; | 18 | const LOG: &'static str = ""; |
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index 8fe2aa816..d1339f62f 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -25,7 +25,7 @@ use ra_lsp_server::{main_loop, req, thread_watcher::{ThreadWatcher, Worker}}; | |||
25 | 25 | ||
26 | pub fn project(fixture: &str) -> Server { | 26 | pub fn project(fixture: &str) -> Server { |
27 | static INIT: Once = Once::new(); | 27 | static INIT: Once = Once::new(); |
28 | INIT.call_once(|| Logger::with_env_or_str(::LOG).start().unwrap()); | 28 | INIT.call_once(|| Logger::with_env_or_str(crate::LOG).start().unwrap()); |
29 | 29 | ||
30 | let tmp_dir = TempDir::new("test-project") | 30 | let tmp_dir = TempDir::new("test-project") |
31 | .unwrap(); | 31 | .unwrap(); |