From 7ae696ba7642aba92c2eed012d9e02c09bab7460 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Jul 2020 18:22:57 +0200 Subject: Remove unwanted dependency --- crates/ra_db/src/lib.rs | 2 +- crates/rust-analyzer/src/bin/args.rs | 2 +- crates/rust-analyzer/src/bin/main.rs | 5 ++--- crates/rust-analyzer/src/cargo_target_spec.rs | 2 +- crates/rust-analyzer/src/cli/analysis_bench.rs | 3 ++- crates/rust-analyzer/src/cli/load_cargo.rs | 4 ++-- crates/rust-analyzer/src/config.rs | 2 +- crates/rust-analyzer/tests/heavy_tests/support.rs | 11 +++++------ 8 files changed, 15 insertions(+), 16 deletions(-) (limited to 'crates') diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 183822601..3a8fd44c4 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -18,7 +18,7 @@ pub use crate::{ }; pub use relative_path::{RelativePath, RelativePathBuf}; pub use salsa; -pub use vfs::{file_set::FileSet, AbsPathBuf, VfsPath}; +pub use vfs::{file_set::FileSet, VfsPath}; #[macro_export] macro_rules! impl_intern_key { diff --git a/crates/rust-analyzer/src/bin/args.rs b/crates/rust-analyzer/src/bin/args.rs index 85c2e415a..d0e566f47 100644 --- a/crates/rust-analyzer/src/bin/args.rs +++ b/crates/rust-analyzer/src/bin/args.rs @@ -7,9 +7,9 @@ use std::{env, fmt::Write, path::PathBuf}; use anyhow::{bail, Result}; use pico_args::Arguments; -use ra_db::AbsPathBuf; use ra_ssr::{SsrPattern, SsrRule}; use rust_analyzer::cli::{BenchWhat, Position, Verbosity}; +use vfs::AbsPathBuf; pub(crate) struct Args { pub(crate) verbosity: Verbosity, diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index eec76d415..047772d0c 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs @@ -6,14 +6,13 @@ mod args; use std::convert::TryFrom; use lsp_server::Connection; +use ra_project_model::ProjectManifest; use rust_analyzer::{ cli, config::{Config, LinkedProject}, from_json, Result, }; - -use ra_db::AbsPathBuf; -use ra_project_model::ProjectManifest; +use vfs::AbsPathBuf; use crate::args::HelpPrinted; diff --git a/crates/rust-analyzer/src/cargo_target_spec.rs b/crates/rust-analyzer/src/cargo_target_spec.rs index 929926cbc..318399624 100644 --- a/crates/rust-analyzer/src/cargo_target_spec.rs +++ b/crates/rust-analyzer/src/cargo_target_spec.rs @@ -1,9 +1,9 @@ //! See `CargoTargetSpec` use ra_cfg::CfgExpr; -use ra_db::AbsPathBuf; use ra_ide::{FileId, RunnableKind, TestId}; use ra_project_model::{self, TargetKind}; +use vfs::AbsPathBuf; use crate::{global_state::GlobalStateSnapshot, Result}; diff --git a/crates/rust-analyzer/src/cli/analysis_bench.rs b/crates/rust-analyzer/src/cli/analysis_bench.rs index 90990d3e7..a93d5fb73 100644 --- a/crates/rust-analyzer/src/cli/analysis_bench.rs +++ b/crates/rust-analyzer/src/cli/analysis_bench.rs @@ -5,9 +5,10 @@ use std::{env, path::Path, str::FromStr, sync::Arc, time::Instant}; use anyhow::{format_err, Result}; use ra_db::{ salsa::{Database, Durability}, - AbsPathBuf, FileId, + FileId, }; use ra_ide::{Analysis, AnalysisChange, AnalysisHost, CompletionConfig, FilePosition, LineCol}; +use vfs::AbsPathBuf; use crate::cli::{load_cargo::load_cargo, Verbosity}; diff --git a/crates/rust-analyzer/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs index d8677c231..a43bf2244 100644 --- a/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/crates/rust-analyzer/src/cli/load_cargo.rs @@ -4,10 +4,10 @@ use std::{path::Path, sync::Arc}; use anyhow::Result; use crossbeam_channel::{unbounded, Receiver}; -use ra_db::{AbsPathBuf, CrateGraph}; +use ra_db::CrateGraph; use ra_ide::{AnalysisChange, AnalysisHost}; use ra_project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace}; -use vfs::{loader::Handle, AbsPath}; +use vfs::{loader::Handle, AbsPath, AbsPathBuf}; use crate::reload::{ProjectFolders, SourceRootConfig}; diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index e42e41a41..9e7de0243 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -11,10 +11,10 @@ use std::{ffi::OsString, path::PathBuf}; use flycheck::FlycheckConfig; use lsp_types::ClientCapabilities; -use ra_db::AbsPathBuf; use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; use serde::Deserialize; +use vfs::AbsPathBuf; use crate::diagnostics::DiagnosticsConfig; diff --git a/crates/rust-analyzer/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs index 7bf687794..e51796d36 100644 --- a/crates/rust-analyzer/tests/heavy_tests/support.rs +++ b/crates/rust-analyzer/tests/heavy_tests/support.rs @@ -12,17 +12,16 @@ use lsp_types::{ notification::Exit, request::Shutdown, TextDocumentIdentifier, Url, WorkDoneProgress, }; use lsp_types::{ProgressParams, ProgressParamsValue}; -use serde::Serialize; -use serde_json::{to_string_pretty, Value}; -use tempfile::TempDir; -use test_utils::{find_mismatch, Fixture}; - -use ra_db::AbsPathBuf; use ra_project_model::ProjectManifest; use rust_analyzer::{ config::{ClientCapsConfig, Config, FilesConfig, FilesWatcher, LinkedProject}, main_loop, }; +use serde::Serialize; +use serde_json::{to_string_pretty, Value}; +use tempfile::TempDir; +use test_utils::{find_mismatch, Fixture}; +use vfs::AbsPathBuf; pub struct Project<'a> { fixture: &'a str, -- cgit v1.2.3