diff options
author | Aleksey Kladov <[email protected]> | 2020-06-26 10:39:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-26 10:39:27 +0100 |
commit | 34118779ecd315efd2e17d0a055c3afc8ed0fed6 (patch) | |
tree | 505a9a2def032afc6fa3ca4c13209c6b2dab0b28 /crates/rust-analyzer | |
parent | 2fd25e2d98fa7cd898a337a604b1ff90cb8152bd (diff) |
Workaround use Trait as _ bug in rust-analyzer
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/global_state.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs index a9a1d09fd..5b6c7922d 100644 --- a/crates/rust-analyzer/src/global_state.rs +++ b/crates/rust-analyzer/src/global_state.rs | |||
@@ -13,7 +13,6 @@ use ra_db::{CrateId, VfsPath}; | |||
13 | use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId}; | 13 | use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId}; |
14 | use ra_project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target}; | 14 | use ra_project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target}; |
15 | use stdx::format_to; | 15 | use stdx::format_to; |
16 | use vfs::loader::Handle as _; | ||
17 | 16 | ||
18 | use crate::{ | 17 | use crate::{ |
19 | config::Config, | 18 | config::Config, |
@@ -90,8 +89,8 @@ impl GlobalState { | |||
90 | pub(crate) fn new(sender: Sender<lsp_server::Message>, config: Config) -> GlobalState { | 89 | pub(crate) fn new(sender: Sender<lsp_server::Message>, config: Config) -> GlobalState { |
91 | let loader = { | 90 | let loader = { |
92 | let (sender, receiver) = unbounded::<vfs::loader::Message>(); | 91 | let (sender, receiver) = unbounded::<vfs::loader::Message>(); |
93 | let handle = | 92 | let handle: vfs_notify::NotifyHandle = |
94 | vfs_notify::NotifyHandle::spawn(Box::new(move |msg| sender.send(msg).unwrap())); | 93 | vfs::loader::Handle::spawn(Box::new(move |msg| sender.send(msg).unwrap())); |
95 | let handle = Box::new(handle) as Box<dyn vfs::loader::Handle>; | 94 | let handle = Box::new(handle) as Box<dyn vfs::loader::Handle>; |
96 | Handle { handle, receiver } | 95 | Handle { handle, receiver } |
97 | }; | 96 | }; |