mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
migrate analysis and server to 2018
This commit is contained in:
parent
2dd6858d03
commit
bb298158eb
21 changed files with 42 additions and 36 deletions
|
@ -7,7 +7,7 @@ use ra_editor::{LineIndex, LineCol, Edit, AtomEdit};
|
|||
use ra_syntax::{SyntaxKind, TextUnit, TextRange};
|
||||
use ra_analysis::{FileId, SourceChange, SourceFileEdit, FileSystemEdit};
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
Result,
|
||||
server_world::ServerWorld,
|
||||
req,
|
||||
|
@ -299,7 +299,7 @@ pub fn to_location(
|
|||
Ok(loc)
|
||||
}
|
||||
|
||||
pub trait MapConvWith<'a>: Sized {
|
||||
pub trait MapConvWith<'a>: Sized + 'a {
|
||||
type Ctx;
|
||||
type Output;
|
||||
|
||||
|
@ -309,7 +309,7 @@ pub trait MapConvWith<'a>: Sized {
|
|||
}
|
||||
|
||||
impl<'a, I> MapConvWith<'a> for I
|
||||
where I: Iterator,
|
||||
where I: Iterator + 'a,
|
||||
I::Item: ConvWith
|
||||
{
|
||||
type Ctx = <I::Item as ConvWith>::Ctx;
|
||||
|
|
|
@ -34,5 +34,7 @@ mod project_model;
|
|||
pub mod thread_watcher;
|
||||
|
||||
pub type Result<T> = ::std::result::Result<T, ::failure::Error>;
|
||||
pub use caps::server_capabilities;
|
||||
pub use main_loop::main_loop;
|
||||
pub use crate::{
|
||||
main_loop::main_loop,
|
||||
caps::server_capabilities,
|
||||
};
|
||||
|
|
|
@ -13,7 +13,7 @@ use ra_syntax::{
|
|||
text_utils::contains_offset_nonstrict
|
||||
};
|
||||
|
||||
use ::{
|
||||
use crate::{
|
||||
req::{self, Decoration}, Result,
|
||||
conv::{Conv, ConvWith, TryConvWith, MapConvWith, to_location},
|
||||
server_world::ServerWorld,
|
||||
|
|
|
@ -16,7 +16,7 @@ use gen_lsp_server::{
|
|||
};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
req,
|
||||
Result,
|
||||
vfs::{self, FileEvent},
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc_hash::{FxHashMap, FxHashSet};
|
|||
use cargo_metadata::{metadata_run, CargoOpt};
|
||||
use ra_syntax::SmolStr;
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
Result,
|
||||
thread_watcher::{Worker, ThreadWatcher},
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ use rustc_hash::FxHashMap;
|
|||
use languageserver_types::Url;
|
||||
use ra_analysis::{FileId, AnalysisHost, Analysis, CrateGraph, CrateId, LibraryData, FileResolver};
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
Result,
|
||||
path_map::{PathMap, Root},
|
||||
vfs::{FileEvent, FileEventKind},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::thread;
|
||||
use crossbeam_channel::{bounded, unbounded, Sender, Receiver};
|
||||
use drop_bomb::DropBomb;
|
||||
use Result;
|
||||
use crate::Result;
|
||||
|
||||
pub struct Worker<I, O> {
|
||||
pub inp: Sender<I>,
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
|
||||
use walkdir::WalkDir;
|
||||
|
||||
use {
|
||||
use crate::{
|
||||
thread_watcher::{Worker, ThreadWatcher},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue