diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 18:55:03 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 18:55:03 +0100 |
commit | e929355eca10b1d8d4e55ddd41549d5bf0a685aa (patch) | |
tree | 872ab3701dcd27207fab5531269a66d205c74539 /crates/ra_lsp_server/src | |
parent | a230b438e025c5878b8d17e11d3928cbad95bb28 (diff) | |
parent | 9a98d8e99acf8acd40b2153847a37551d2a8d0f4 (diff) |
Merge #129
129: 2018 r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 6 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/mod.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/project_model.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/server_world.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/thread_watcher.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/vfs.rs | 2 |
8 files changed, 13 insertions, 11 deletions
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 | ||