diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-03 22:29:30 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-03 22:29:30 +0000 |
commit | 5c35539f0f69472546253d415c30f524d0a1a212 (patch) | |
tree | fb385c03f3fdd627e9a8a97b329fac347c818e84 /crates | |
parent | e811be0fdca02b8aafc5da0109c655030232b4af (diff) | |
parent | 3603d0213480c7b3423345d21243397eb904a073 (diff) |
Merge #2171
2171: Reexport relative_path from ra_db r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_db/src/input.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/mock.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/diagnostics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/mod_resolution.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir_def/src/test_db.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide_api/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/db.rs | 5 | ||||
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide_api/src/mock_analysis.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/references/rename.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide_api/src/source_change.rs | 2 |
15 files changed, 15 insertions, 24 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 7c8dac1d3..60f7dc881 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -6,13 +6,14 @@ | |||
6 | //! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how | 6 | //! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how |
7 | //! actual IO is done and lowered to input. | 7 | //! actual IO is done and lowered to input. |
8 | 8 | ||
9 | use relative_path::{RelativePath, RelativePathBuf}; | ||
10 | use rustc_hash::FxHashMap; | 9 | use rustc_hash::FxHashMap; |
11 | 10 | ||
12 | use ra_cfg::CfgOptions; | 11 | use ra_cfg::CfgOptions; |
13 | use ra_syntax::SmolStr; | 12 | use ra_syntax::SmolStr; |
14 | use rustc_hash::FxHashSet; | 13 | use rustc_hash::FxHashSet; |
15 | 14 | ||
15 | use crate::{RelativePath, RelativePathBuf}; | ||
16 | |||
16 | /// `FileId` is an integer which uniquely identifies a file. File paths are | 17 | /// `FileId` is an integer which uniquely identifies a file. File paths are |
17 | /// messy and system-dependent, so most of the code should work directly with | 18 | /// messy and system-dependent, so most of the code should work directly with |
18 | /// `FileId`, without inspecting the path. The mapping between `FileId` and path | 19 | /// `FileId`, without inspecting the path. The mapping between `FileId` and path |
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index fae5dc7cb..324961328 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml | |||
@@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"] | |||
7 | [dependencies] | 7 | [dependencies] |
8 | arrayvec = "0.5.1" | 8 | arrayvec = "0.5.1" |
9 | log = "0.4.5" | 9 | log = "0.4.5" |
10 | relative-path = "1.0.0" | ||
11 | rustc-hash = "1.0" | 10 | rustc-hash = "1.0" |
12 | parking_lot = "0.9.0" | 11 | parking_lot = "0.9.0" |
13 | ena = "0.13" | 12 | ena = "0.13" |
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index 4c89c8d38..8d98f88ce 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -7,9 +7,8 @@ use parking_lot::Mutex; | |||
7 | use ra_cfg::CfgOptions; | 7 | use ra_cfg::CfgOptions; |
8 | use ra_db::{ | 8 | use ra_db::{ |
9 | salsa, CrateGraph, CrateId, Edition, FileId, FileLoader, FileLoaderDelegate, FilePosition, | 9 | salsa, CrateGraph, CrateId, Edition, FileId, FileLoader, FileLoaderDelegate, FilePosition, |
10 | SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, | 10 | RelativePath, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, |
11 | }; | 11 | }; |
12 | use relative_path::{RelativePath, RelativePathBuf}; | ||
13 | use rustc_hash::FxHashMap; | 12 | use rustc_hash::FxHashMap; |
14 | use test_utils::{extract_offset, parse_fixture, CURSOR_MARKER}; | 13 | use test_utils::{extract_offset, parse_fixture, CURSOR_MARKER}; |
15 | 14 | ||
diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml index 15055db64..21262be79 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/ra_hir_def/Cargo.toml | |||
@@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"] | |||
7 | [dependencies] | 7 | [dependencies] |
8 | log = "0.4.5" | 8 | log = "0.4.5" |
9 | once_cell = "1.0.1" | 9 | once_cell = "1.0.1" |
10 | relative-path = "1.0.0" | ||
11 | rustc-hash = "1.0" | 10 | rustc-hash = "1.0" |
12 | 11 | ||
13 | ra_arena = { path = "../ra_arena" } | 12 | ra_arena = { path = "../ra_arena" } |
@@ -22,4 +21,3 @@ tt = { path = "../ra_tt", package = "ra_tt" } | |||
22 | 21 | ||
23 | [dev-dependencies] | 22 | [dev-dependencies] |
24 | insta = "0.12.0" | 23 | insta = "0.12.0" |
25 | |||
diff --git a/crates/ra_hir_def/src/diagnostics.rs b/crates/ra_hir_def/src/diagnostics.rs index 1c1ccdecb..9843009a5 100644 --- a/crates/ra_hir_def/src/diagnostics.rs +++ b/crates/ra_hir_def/src/diagnostics.rs | |||
@@ -3,8 +3,8 @@ | |||
3 | use std::any::Any; | 3 | use std::any::Any; |
4 | 4 | ||
5 | use hir_expand::diagnostics::Diagnostic; | 5 | use hir_expand::diagnostics::Diagnostic; |
6 | use ra_db::RelativePathBuf; | ||
6 | use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; | 7 | use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; |
7 | use relative_path::RelativePathBuf; | ||
8 | 8 | ||
9 | use hir_expand::{HirFileId, Source}; | 9 | use hir_expand::{HirFileId, Source}; |
10 | 10 | ||
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index fbd4248e6..433bdde48 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -504,8 +504,8 @@ impl CrateDefMap { | |||
504 | 504 | ||
505 | mod diagnostics { | 505 | mod diagnostics { |
506 | use hir_expand::diagnostics::DiagnosticSink; | 506 | use hir_expand::diagnostics::DiagnosticSink; |
507 | use ra_db::RelativePathBuf; | ||
507 | use ra_syntax::{ast, AstPtr}; | 508 | use ra_syntax::{ast, AstPtr}; |
508 | use relative_path::RelativePathBuf; | ||
509 | 509 | ||
510 | use crate::{db::DefDatabase2, diagnostics::UnresolvedModule, nameres::CrateModuleId, AstId}; | 510 | use crate::{db::DefDatabase2, diagnostics::UnresolvedModule, nameres::CrateModuleId, AstId}; |
511 | 511 | ||
diff --git a/crates/ra_hir_def/src/nameres/mod_resolution.rs b/crates/ra_hir_def/src/nameres/mod_resolution.rs index 7d7e2779a..f6b0b8fb1 100644 --- a/crates/ra_hir_def/src/nameres/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/mod_resolution.rs | |||
@@ -1,8 +1,7 @@ | |||
1 | //! This module resolves `mod foo;` declaration to file. | 1 | //! This module resolves `mod foo;` declaration to file. |
2 | use hir_expand::name::Name; | 2 | use hir_expand::name::Name; |
3 | use ra_db::FileId; | 3 | use ra_db::{FileId, RelativePathBuf}; |
4 | use ra_syntax::SmolStr; | 4 | use ra_syntax::SmolStr; |
5 | use relative_path::RelativePathBuf; | ||
6 | 5 | ||
7 | use crate::{db::DefDatabase2, HirFileId}; | 6 | use crate::{db::DefDatabase2, HirFileId}; |
8 | 7 | ||
diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/ra_hir_def/src/test_db.rs index f91a5b41d..8ee8e40d0 100644 --- a/crates/ra_hir_def/src/test_db.rs +++ b/crates/ra_hir_def/src/test_db.rs | |||
@@ -5,8 +5,7 @@ use std::{ | |||
5 | sync::{Arc, Mutex}, | 5 | sync::{Arc, Mutex}, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate}; | 8 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath}; |
9 | use relative_path::RelativePath; | ||
10 | 9 | ||
11 | #[salsa::database( | 10 | #[salsa::database( |
12 | ra_db::SourceDatabaseExtStorage, | 11 | ra_db::SourceDatabaseExtStorage, |
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml index bf6ef12f3..fa353b5dd 100644 --- a/crates/ra_ide_api/Cargo.toml +++ b/crates/ra_ide_api/Cargo.toml | |||
@@ -12,7 +12,6 @@ format-buf = "1.0.0" | |||
12 | itertools = "0.8.0" | 12 | itertools = "0.8.0" |
13 | join_to_string = "0.1.3" | 13 | join_to_string = "0.1.3" |
14 | log = "0.4.5" | 14 | log = "0.4.5" |
15 | relative-path = "1.0.0" | ||
16 | rayon = "1.0.2" | 15 | rayon = "1.0.2" |
17 | fst = { version = "0.3.1", default-features = false } | 16 | fst = { version = "0.3.1", default-features = false } |
18 | rustc-hash = "1.0" | 17 | rustc-hash = "1.0" |
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 39c5946c7..4416421ae 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -4,13 +4,13 @@ use std::{fmt, sync::Arc, time}; | |||
4 | 4 | ||
5 | use ra_db::{ | 5 | use ra_db::{ |
6 | salsa::{Database, Durability, SweepStrategy}, | 6 | salsa::{Database, Durability, SweepStrategy}, |
7 | CrateGraph, CrateId, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, | 7 | CrateGraph, CrateId, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, |
8 | SourceRootId, | ||
8 | }; | 9 | }; |
9 | use ra_prof::{memory_usage, profile, Bytes}; | 10 | use ra_prof::{memory_usage, profile, Bytes}; |
10 | use ra_syntax::SourceFile; | 11 | use ra_syntax::SourceFile; |
11 | #[cfg(not(feature = "wasm"))] | 12 | #[cfg(not(feature = "wasm"))] |
12 | use rayon::prelude::*; | 13 | use rayon::prelude::*; |
13 | use relative_path::RelativePathBuf; | ||
14 | use rustc_hash::FxHashMap; | 14 | use rustc_hash::FxHashMap; |
15 | 15 | ||
16 | use crate::{ | 16 | use crate::{ |
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index 785e71808..c96465b6a 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs | |||
@@ -4,10 +4,9 @@ use std::sync::Arc; | |||
4 | 4 | ||
5 | use ra_db::{ | 5 | use ra_db::{ |
6 | salsa::{self, Database, Durability}, | 6 | salsa::{self, Database, Durability}, |
7 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, | 7 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, |
8 | SourceDatabaseExt, SourceRootId, | 8 | SourceDatabase, SourceDatabaseExt, SourceRootId, |
9 | }; | 9 | }; |
10 | use relative_path::RelativePath; | ||
11 | use rustc_hash::FxHashMap; | 10 | use rustc_hash::FxHashMap; |
12 | 11 | ||
13 | use crate::{ | 12 | use crate::{ |
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 1f1f5cd74..2890a3d2b 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -4,7 +4,7 @@ use std::cell::RefCell; | |||
4 | 4 | ||
5 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; | 5 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; |
6 | use itertools::Itertools; | 6 | use itertools::Itertools; |
7 | use ra_db::{SourceDatabase, SourceDatabaseExt}; | 7 | use ra_db::{RelativePath, SourceDatabase, SourceDatabaseExt}; |
8 | use ra_prof::profile; | 8 | use ra_prof::profile; |
9 | use ra_syntax::{ | 9 | use ra_syntax::{ |
10 | algo, | 10 | algo, |
@@ -12,7 +12,6 @@ use ra_syntax::{ | |||
12 | Location, SyntaxNode, TextRange, T, | 12 | Location, SyntaxNode, TextRange, T, |
13 | }; | 13 | }; |
14 | use ra_text_edit::{TextEdit, TextEditBuilder}; | 14 | use ra_text_edit::{TextEdit, TextEditBuilder}; |
15 | use relative_path::RelativePath; | ||
16 | 15 | ||
17 | use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit}; | 16 | use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit}; |
18 | 17 | ||
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide_api/src/mock_analysis.rs index 80b71894c..2b1c96dbf 100644 --- a/crates/ra_ide_api/src/mock_analysis.rs +++ b/crates/ra_ide_api/src/mock_analysis.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use ra_cfg::CfgOptions; | 5 | use ra_cfg::CfgOptions; |
6 | use relative_path::RelativePathBuf; | 6 | use ra_db::RelativePathBuf; |
7 | use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER}; | 7 | use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER}; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
diff --git a/crates/ra_ide_api/src/references/rename.rs b/crates/ra_ide_api/src/references/rename.rs index a8783d7a0..11f81cbb3 100644 --- a/crates/ra_ide_api/src/references/rename.rs +++ b/crates/ra_ide_api/src/references/rename.rs | |||
@@ -1,10 +1,9 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::ModuleSource; | 3 | use hir::ModuleSource; |
4 | use ra_db::{SourceDatabase, SourceDatabaseExt}; | 4 | use ra_db::{RelativePath, RelativePathBuf, SourceDatabase, SourceDatabaseExt}; |
5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode}; | 5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode}; |
6 | use ra_text_edit::TextEdit; | 6 | use ra_text_edit::TextEdit; |
7 | use relative_path::{RelativePath, RelativePathBuf}; | ||
8 | 7 | ||
9 | use crate::{ | 8 | use crate::{ |
10 | db::RootDatabase, FileId, FilePosition, FileSystemEdit, RangeInfo, SourceChange, | 9 | db::RootDatabase, FileId, FilePosition, FileSystemEdit, RangeInfo, SourceChange, |
diff --git a/crates/ra_ide_api/src/source_change.rs b/crates/ra_ide_api/src/source_change.rs index 4e63bbf6f..f5f7f8807 100644 --- a/crates/ra_ide_api/src/source_change.rs +++ b/crates/ra_ide_api/src/source_change.rs | |||
@@ -3,8 +3,8 @@ | |||
3 | //! | 3 | //! |
4 | //! It can be viewed as a dual for `AnalysisChange`. | 4 | //! It can be viewed as a dual for `AnalysisChange`. |
5 | 5 | ||
6 | use ra_db::RelativePathBuf; | ||
6 | use ra_text_edit::TextEdit; | 7 | use ra_text_edit::TextEdit; |
7 | use relative_path::RelativePathBuf; | ||
8 | 8 | ||
9 | use crate::{FileId, FilePosition, SourceRootId, TextUnit}; | 9 | use crate::{FileId, FilePosition, SourceRootId, TextUnit}; |
10 | 10 | ||