aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-13 09:52:31 +0100
committerGitHub <[email protected]>2020-08-13 09:52:31 +0100
commit882e1a95ea6844d3e3fc3a47afdd44d145630c49 (patch)
tree35a33a55c4715c255914d5104b25f2f21862c49d /crates
parente30be7ad15272746e761a29cb1829defecd231cc (diff)
parent7d9480c6eb43b3ef1bd75ad26e99c14cca5cb366 (diff)
Merge pull request #5738 from matklad/cfg
Rename ra_cfg -> cfg
Diffstat (limited to 'crates')
-rw-r--r--crates/cfg/Cargo.toml (renamed from crates/ra_cfg/Cargo.toml)12
-rw-r--r--crates/cfg/src/cfg_expr.rs (renamed from crates/ra_cfg/src/cfg_expr.rs)16
-rw-r--r--crates/cfg/src/lib.rs (renamed from crates/ra_cfg/src/lib.rs)4
-rw-r--r--crates/mbe/Cargo.toml (renamed from crates/ra_mbe/Cargo.toml)15
-rw-r--r--crates/mbe/src/lib.rs (renamed from crates/ra_mbe/src/lib.rs)0
-rw-r--r--crates/mbe/src/mbe_expander.rs (renamed from crates/ra_mbe/src/mbe_expander.rs)0
-rw-r--r--crates/mbe/src/mbe_expander/matcher.rs (renamed from crates/ra_mbe/src/mbe_expander/matcher.rs)0
-rw-r--r--crates/mbe/src/mbe_expander/transcriber.rs (renamed from crates/ra_mbe/src/mbe_expander/transcriber.rs)0
-rw-r--r--crates/mbe/src/parser.rs (renamed from crates/ra_mbe/src/parser.rs)0
-rw-r--r--crates/mbe/src/subtree_source.rs (renamed from crates/ra_mbe/src/subtree_source.rs)0
-rw-r--r--crates/mbe/src/syntax_bridge.rs (renamed from crates/ra_mbe/src/syntax_bridge.rs)0
-rw-r--r--crates/mbe/src/tests.rs (renamed from crates/ra_mbe/src/tests.rs)0
-rw-r--r--crates/mbe/src/tt_iter.rs (renamed from crates/ra_mbe/src/tt_iter.rs)0
-rw-r--r--crates/proc_macro_srv/Cargo.toml8
-rw-r--r--crates/proc_macro_srv/src/rustc_server.rs2
-rw-r--r--crates/ra_db/Cargo.toml2
-rw-r--r--crates/ra_db/src/fixture.rs2
-rw-r--r--crates/ra_db/src/input.rs2
-rw-r--r--crates/ra_hir_def/Cargo.toml4
-rw-r--r--crates/ra_hir_def/src/adt.rs2
-rw-r--r--crates/ra_hir_def/src/attr.rs2
-rw-r--r--crates/ra_hir_def/src/body.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs2
-rw-r--r--crates/ra_hir_expand/Cargo.toml2
-rw-r--r--crates/ra_ide/Cargo.toml2
-rw-r--r--crates/ra_ide/src/lib.rs2
-rw-r--r--crates/ra_ide/src/mock_analysis.rs2
-rw-r--r--crates/ra_ide/src/parent_module.rs2
-rw-r--r--crates/ra_ide/src/runnables.rs2
-rw-r--r--crates/ra_project_model/Cargo.toml2
-rw-r--r--crates/ra_project_model/src/cfg_flag.rs2
-rw-r--r--crates/ra_project_model/src/lib.rs2
-rw-r--r--crates/rust-analyzer/Cargo.toml4
-rw-r--r--crates/rust-analyzer/src/cargo_target_spec.rs4
34 files changed, 51 insertions, 50 deletions
diff --git a/crates/ra_cfg/Cargo.toml b/crates/cfg/Cargo.toml
index cb0d2b9d7..d2ea551d1 100644
--- a/crates/ra_cfg/Cargo.toml
+++ b/crates/cfg/Cargo.toml
@@ -1,9 +1,9 @@
1[package] 1[package]
2edition = "2018" 2name = "cfg"
3name = "ra_cfg" 3version = "0.0.0"
4version = "0.1.0"
5authors = ["rust-analyzer developers"]
6license = "MIT OR Apache-2.0" 4license = "MIT OR Apache-2.0"
5authors = ["rust-analyzer developers"]
6edition = "2018"
7 7
8[lib] 8[lib]
9doctest = false 9doctest = false
@@ -11,8 +11,8 @@ doctest = false
11[dependencies] 11[dependencies]
12rustc-hash = "1.1.0" 12rustc-hash = "1.1.0"
13 13
14syntax = { path = "../syntax" }
15tt = { path = "../tt" } 14tt = { path = "../tt" }
16 15
17[dev-dependencies] 16[dev-dependencies]
18mbe = { path = "../ra_mbe", package = "ra_mbe" } 17mbe = { path = "../mbe" }
18syntax = { path = "../syntax" }
diff --git a/crates/ra_cfg/src/cfg_expr.rs b/crates/cfg/src/cfg_expr.rs
index 940091465..336fe25bc 100644
--- a/crates/ra_cfg/src/cfg_expr.rs
+++ b/crates/cfg/src/cfg_expr.rs
@@ -4,7 +4,7 @@
4 4
5use std::slice::Iter as SliceIter; 5use std::slice::Iter as SliceIter;
6 6
7use syntax::SmolStr; 7use tt::SmolStr;
8 8
9#[derive(Debug, Clone, PartialEq, Eq)] 9#[derive(Debug, Clone, PartialEq, Eq)]
10pub enum CfgExpr { 10pub enum CfgExpr {
@@ -86,17 +86,15 @@ fn next_cfg_expr(it: &mut SliceIter<tt::TokenTree>) -> Option<CfgExpr> {
86mod tests { 86mod tests {
87 use super::*; 87 use super::*;
88 88
89 use mbe::{ast_to_token_tree, TokenMap}; 89 use mbe::ast_to_token_tree;
90 use syntax::ast::{self, AstNode}; 90 use syntax::ast::{self, AstNode};
91 91
92 fn get_token_tree_generated(input: &str) -> (tt::Subtree, TokenMap) {
93 let source_file = ast::SourceFile::parse(input).ok().unwrap();
94 let tt = source_file.syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
95 ast_to_token_tree(&tt).unwrap()
96 }
97
98 fn assert_parse_result(input: &str, expected: CfgExpr) { 92 fn assert_parse_result(input: &str, expected: CfgExpr) {
99 let (tt, _) = get_token_tree_generated(input); 93 let (tt, _) = {
94 let source_file = ast::SourceFile::parse(input).ok().unwrap();
95 let tt = source_file.syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
96 ast_to_token_tree(&tt).unwrap()
97 };
100 let cfg = CfgExpr::parse(&tt); 98 let cfg = CfgExpr::parse(&tt);
101 assert_eq!(cfg, expected); 99 assert_eq!(cfg, expected);
102 } 100 }
diff --git a/crates/ra_cfg/src/lib.rs b/crates/cfg/src/lib.rs
index 7e025143b..a9d50e698 100644
--- a/crates/ra_cfg/src/lib.rs
+++ b/crates/cfg/src/lib.rs
@@ -1,9 +1,9 @@
1//! ra_cfg defines conditional compiling options, `cfg` attibute parser and evaluator 1//! cfg defines conditional compiling options, `cfg` attibute parser and evaluator
2 2
3mod cfg_expr; 3mod cfg_expr;
4 4
5use rustc_hash::FxHashSet; 5use rustc_hash::FxHashSet;
6use syntax::SmolStr; 6use tt::SmolStr;
7 7
8pub use cfg_expr::CfgExpr; 8pub use cfg_expr::CfgExpr;
9 9
diff --git a/crates/ra_mbe/Cargo.toml b/crates/mbe/Cargo.toml
index 4a4be65eb..1aba8b7c4 100644
--- a/crates/ra_mbe/Cargo.toml
+++ b/crates/mbe/Cargo.toml
@@ -1,20 +1,21 @@
1[package] 1[package]
2edition = "2018" 2name = "mbe"
3name = "ra_mbe" 3version = "0.0.0"
4version = "0.1.0"
5authors = ["rust-analyzer developers"]
6license = "MIT OR Apache-2.0" 4license = "MIT OR Apache-2.0"
5authors = ["rust-analyzer developers"]
6edition = "2018"
7 7
8[lib] 8[lib]
9doctest = false 9doctest = false
10 10
11[dependencies] 11[dependencies]
12syntax = { path = "../syntax" }
13parser = { path = "../parser" }
14tt = { path = "../tt" }
15rustc-hash = "1.1.0" 12rustc-hash = "1.1.0"
16smallvec = "1.2.0" 13smallvec = "1.2.0"
17log = "0.4.8" 14log = "0.4.8"
18 15
16syntax = { path = "../syntax" }
17parser = { path = "../parser" }
18tt = { path = "../tt" }
19
19[dev-dependencies] 20[dev-dependencies]
20test_utils = { path = "../test_utils" } 21test_utils = { path = "../test_utils" }
diff --git a/crates/ra_mbe/src/lib.rs b/crates/mbe/src/lib.rs
index f854ca09a..f854ca09a 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/mbe/src/lib.rs
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/mbe/src/mbe_expander.rs
index 1ad8b9f8a..1ad8b9f8a 100644
--- a/crates/ra_mbe/src/mbe_expander.rs
+++ b/crates/mbe/src/mbe_expander.rs
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/mbe/src/mbe_expander/matcher.rs
index b698b9832..b698b9832 100644
--- a/crates/ra_mbe/src/mbe_expander/matcher.rs
+++ b/crates/mbe/src/mbe_expander/matcher.rs
diff --git a/crates/ra_mbe/src/mbe_expander/transcriber.rs b/crates/mbe/src/mbe_expander/transcriber.rs
index c9525c5bf..c9525c5bf 100644
--- a/crates/ra_mbe/src/mbe_expander/transcriber.rs
+++ b/crates/mbe/src/mbe_expander/transcriber.rs
diff --git a/crates/ra_mbe/src/parser.rs b/crates/mbe/src/parser.rs
index 6b46a1673..6b46a1673 100644
--- a/crates/ra_mbe/src/parser.rs
+++ b/crates/mbe/src/parser.rs
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/mbe/src/subtree_source.rs
index 41461b315..41461b315 100644
--- a/crates/ra_mbe/src/subtree_source.rs
+++ b/crates/mbe/src/subtree_source.rs
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs
index a8ad917fb..a8ad917fb 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/mbe/src/syntax_bridge.rs
diff --git a/crates/ra_mbe/src/tests.rs b/crates/mbe/src/tests.rs
index 0796ceee1..0796ceee1 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/mbe/src/tests.rs
diff --git a/crates/ra_mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs
index 46c420718..46c420718 100644
--- a/crates/ra_mbe/src/tt_iter.rs
+++ b/crates/mbe/src/tt_iter.rs
diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml
index 775af890e..0954ffb66 100644
--- a/crates/proc_macro_srv/Cargo.toml
+++ b/crates/proc_macro_srv/Cargo.toml
@@ -9,12 +9,13 @@ edition = "2018"
9doctest = false 9doctest = false
10 10
11[dependencies] 11[dependencies]
12tt = { path = "../tt" }
13ra_mbe = { path = "../ra_mbe" }
14ra_proc_macro = { path = "../ra_proc_macro" }
15goblin = "0.2.1" 12goblin = "0.2.1"
16libloading = "0.6.0" 13libloading = "0.6.0"
17memmap = "0.7" 14memmap = "0.7"
15
16tt = { path = "../tt" }
17mbe = { path = "../mbe" }
18ra_proc_macro = { path = "../ra_proc_macro" }
18test_utils = { path = "../test_utils" } 19test_utils = { path = "../test_utils" }
19 20
20[dev-dependencies] 21[dev-dependencies]
@@ -22,4 +23,5 @@ cargo_metadata = "0.11.1"
22difference = "2.0.0" 23difference = "2.0.0"
23# used as proc macro test target 24# used as proc macro test target
24serde_derive = "1.0.106" 25serde_derive = "1.0.106"
26
25toolchain = { path = "../toolchain" } 27toolchain = { path = "../toolchain" }
diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs
index d534d1337..7d1695c86 100644
--- a/crates/proc_macro_srv/src/rustc_server.rs
+++ b/crates/proc_macro_srv/src/rustc_server.rs
@@ -182,7 +182,7 @@ pub mod token_stream {
182 182
183 fn from_str(src: &str) -> Result<TokenStream, LexError> { 183 fn from_str(src: &str) -> Result<TokenStream, LexError> {
184 let (subtree, _token_map) = 184 let (subtree, _token_map) =
185 ra_mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; 185 mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?;
186 186
187 let tt: tt::TokenTree = subtree.into(); 187 let tt: tt::TokenTree = subtree.into();
188 Ok(tt.into()) 188 Ok(tt.into())
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml
index 156ea1ee4..ad432f096 100644
--- a/crates/ra_db/Cargo.toml
+++ b/crates/ra_db/Cargo.toml
@@ -13,7 +13,7 @@ salsa = "0.15.2"
13rustc-hash = "1.1.0" 13rustc-hash = "1.1.0"
14 14
15syntax = { path = "../syntax" } 15syntax = { path = "../syntax" }
16ra_cfg = { path = "../ra_cfg" } 16cfg = { path = "../cfg" }
17profile = { path = "../profile" } 17profile = { path = "../profile" }
18tt = { path = "../tt" } 18tt = { path = "../tt" }
19test_utils = { path = "../test_utils" } 19test_utils = { path = "../test_utils" }
diff --git a/crates/ra_db/src/fixture.rs b/crates/ra_db/src/fixture.rs
index 2aafb9965..5ff8ead0e 100644
--- a/crates/ra_db/src/fixture.rs
+++ b/crates/ra_db/src/fixture.rs
@@ -59,7 +59,7 @@
59//! ``` 59//! ```
60use std::{str::FromStr, sync::Arc}; 60use std::{str::FromStr, sync::Arc};
61 61
62use ra_cfg::CfgOptions; 62use cfg::CfgOptions;
63use rustc_hash::FxHashMap; 63use rustc_hash::FxHashMap;
64use test_utils::{extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER}; 64use test_utils::{extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER};
65use vfs::{file_set::FileSet, VfsPath}; 65use vfs::{file_set::FileSet, VfsPath};
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index 12a863499..f3d65cdf0 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -8,7 +8,7 @@
8 8
9use std::{fmt, iter::FromIterator, ops, str::FromStr, sync::Arc}; 9use std::{fmt, iter::FromIterator, ops, str::FromStr, sync::Arc};
10 10
11use ra_cfg::CfgOptions; 11use cfg::CfgOptions;
12use rustc_hash::{FxHashMap, FxHashSet}; 12use rustc_hash::{FxHashMap, FxHashSet};
13use syntax::SmolStr; 13use syntax::SmolStr;
14use tt::TokenExpander; 14use tt::TokenExpander;
diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml
index 38129782f..e7d3c4d5b 100644
--- a/crates/ra_hir_def/Cargo.toml
+++ b/crates/ra_hir_def/Cargo.toml
@@ -28,8 +28,8 @@ syntax = { path = "../syntax" }
28profile = { path = "../profile" } 28profile = { path = "../profile" }
29hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 29hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
30test_utils = { path = "../test_utils" } 30test_utils = { path = "../test_utils" }
31mbe = { path = "../ra_mbe", package = "ra_mbe" } 31mbe = { path = "../mbe" }
32ra_cfg = { path = "../ra_cfg" } 32cfg = { path = "../cfg" }
33tt = { path = "../tt" } 33tt = { path = "../tt" }
34 34
35[dev-dependencies] 35[dev-dependencies]
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index c83219d77..d69ff2fc7 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -23,7 +23,7 @@ use crate::{
23 EnumId, HasModule, LocalEnumVariantId, LocalFieldId, Lookup, ModuleId, StructId, UnionId, 23 EnumId, HasModule, LocalEnumVariantId, LocalFieldId, Lookup, ModuleId, StructId, UnionId,
24 VariantId, 24 VariantId,
25}; 25};
26use ra_cfg::CfgOptions; 26use cfg::CfgOptions;
27 27
28/// Note that we use `StructData` for unions as well! 28/// Note that we use `StructData` for unions as well!
29#[derive(Debug, Clone, PartialEq, Eq)] 29#[derive(Debug, Clone, PartialEq, Eq)]
diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs
index 36dc8b816..dea552a60 100644
--- a/crates/ra_hir_def/src/attr.rs
+++ b/crates/ra_hir_def/src/attr.rs
@@ -2,10 +2,10 @@
2 2
3use std::{ops, sync::Arc}; 3use std::{ops, sync::Arc};
4 4
5use cfg::{CfgExpr, CfgOptions};
5use either::Either; 6use either::Either;
6use hir_expand::{hygiene::Hygiene, AstId, InFile}; 7use hir_expand::{hygiene::Hygiene, AstId, InFile};
7use mbe::ast_to_token_tree; 8use mbe::ast_to_token_tree;
8use ra_cfg::{CfgExpr, CfgOptions};
9use syntax::{ 9use syntax::{
10 ast::{self, AstNode, AttrsOwner}, 10 ast::{self, AstNode, AttrsOwner},
11 SmolStr, 11 SmolStr,
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs
index 7c33966a7..fe659386a 100644
--- a/crates/ra_hir_def/src/body.rs
+++ b/crates/ra_hir_def/src/body.rs
@@ -6,10 +6,10 @@ pub mod scope;
6use std::{mem, ops::Index, sync::Arc}; 6use std::{mem, ops::Index, sync::Arc};
7 7
8use arena::{map::ArenaMap, Arena}; 8use arena::{map::ArenaMap, Arena};
9use cfg::CfgOptions;
9use drop_bomb::DropBomb; 10use drop_bomb::DropBomb;
10use either::Either; 11use either::Either;
11use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; 12use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
12use ra_cfg::CfgOptions;
13use ra_db::CrateId; 13use ra_db::CrateId;
14use rustc_hash::FxHashMap; 14use rustc_hash::FxHashMap;
15use syntax::{ast, AstNode, AstPtr}; 15use syntax::{ast, AstNode, AstPtr};
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index f7270ec91..6a5891936 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -3,6 +3,7 @@
3//! `DefCollector::collect` contains the fixed-point iteration loop which 3//! `DefCollector::collect` contains the fixed-point iteration loop which
4//! resolves imports and expands macros. 4//! resolves imports and expands macros.
5 5
6use cfg::CfgOptions;
6use hir_expand::{ 7use hir_expand::{
7 ast_id_map::FileAstId, 8 ast_id_map::FileAstId,
8 builtin_derive::find_builtin_derive, 9 builtin_derive::find_builtin_derive,
@@ -11,7 +12,6 @@ use hir_expand::{
11 proc_macro::ProcMacroExpander, 12 proc_macro::ProcMacroExpander,
12 HirFileId, MacroCallId, MacroDefId, MacroDefKind, 13 HirFileId, MacroCallId, MacroDefId, MacroDefKind,
13}; 14};
14use ra_cfg::CfgOptions;
15use ra_db::{CrateId, FileId, ProcMacroId}; 15use ra_db::{CrateId, FileId, ProcMacroId};
16use rustc_hash::FxHashMap; 16use rustc_hash::FxHashMap;
17use syntax::ast; 17use syntax::ast;
diff --git a/crates/ra_hir_expand/Cargo.toml b/crates/ra_hir_expand/Cargo.toml
index 153a70bdf..cbb0ac29b 100644
--- a/crates/ra_hir_expand/Cargo.toml
+++ b/crates/ra_hir_expand/Cargo.toml
@@ -19,5 +19,5 @@ syntax = { path = "../syntax" }
19parser = { path = "../parser" } 19parser = { path = "../parser" }
20profile = { path = "../profile" } 20profile = { path = "../profile" }
21tt = { path = "../tt" } 21tt = { path = "../tt" }
22mbe = { path = "../ra_mbe", package = "ra_mbe" } 22mbe = { path = "../mbe" }
23test_utils = { path = "../test_utils"} 23test_utils = { path = "../test_utils"}
diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml
index 8e0fa5917..c60e55545 100644
--- a/crates/ra_ide/Cargo.toml
+++ b/crates/ra_ide/Cargo.toml
@@ -25,7 +25,7 @@ syntax = { path = "../syntax" }
25text_edit = { path = "../text_edit" } 25text_edit = { path = "../text_edit" }
26ra_db = { path = "../ra_db" } 26ra_db = { path = "../ra_db" }
27ra_ide_db = { path = "../ra_ide_db" } 27ra_ide_db = { path = "../ra_ide_db" }
28ra_cfg = { path = "../ra_cfg" } 28cfg = { path = "../cfg" }
29ra_fmt = { path = "../ra_fmt" } 29ra_fmt = { path = "../ra_fmt" }
30profile = { path = "../profile" } 30profile = { path = "../profile" }
31test_utils = { path = "../test_utils" } 31test_utils = { path = "../test_utils" }
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 20967ba99..1fdf17800 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -47,7 +47,7 @@ mod typing;
47 47
48use std::sync::Arc; 48use std::sync::Arc;
49 49
50use ra_cfg::CfgOptions; 50use cfg::CfgOptions;
51use ra_db::{ 51use ra_db::{
52 salsa::{self, ParallelDatabase}, 52 salsa::{self, ParallelDatabase},
53 CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath, 53 CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath,
diff --git a/crates/ra_ide/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs
index c7e0f4b58..a4691f028 100644
--- a/crates/ra_ide/src/mock_analysis.rs
+++ b/crates/ra_ide/src/mock_analysis.rs
@@ -1,7 +1,7 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2use std::sync::Arc; 2use std::sync::Arc;
3 3
4use ra_cfg::CfgOptions; 4use cfg::CfgOptions;
5use ra_db::{CrateName, FileSet, SourceRoot, VfsPath}; 5use ra_db::{CrateName, FileSet, SourceRoot, VfsPath};
6use test_utils::{ 6use test_utils::{
7 extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER, 7 extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER,
diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs
index 69af0c86a..b78388e6b 100644
--- a/crates/ra_ide/src/parent_module.rs
+++ b/crates/ra_ide/src/parent_module.rs
@@ -63,7 +63,7 @@ pub(crate) fn crate_for(db: &RootDatabase, file_id: FileId) -> Vec<CrateId> {
63 63
64#[cfg(test)] 64#[cfg(test)]
65mod tests { 65mod tests {
66 use ra_cfg::CfgOptions; 66 use cfg::CfgOptions;
67 use ra_db::Env; 67 use ra_db::Env;
68 use test_utils::mark; 68 use test_utils::mark;
69 69
diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs
index 54cb3b309..fb40762cf 100644
--- a/crates/ra_ide/src/runnables.rs
+++ b/crates/ra_ide/src/runnables.rs
@@ -1,8 +1,8 @@
1use std::fmt; 1use std::fmt;
2 2
3use cfg::CfgExpr;
3use hir::{AsAssocItem, Attrs, HirFileId, InFile, Semantics}; 4use hir::{AsAssocItem, Attrs, HirFileId, InFile, Semantics};
4use itertools::Itertools; 5use itertools::Itertools;
5use ra_cfg::CfgExpr;
6use ra_ide_db::RootDatabase; 6use ra_ide_db::RootDatabase;
7use syntax::{ 7use syntax::{
8 ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner}, 8 ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner},
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index 171fe8626..52f2d57b3 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -15,7 +15,7 @@ rustc-hash = "1.1.0"
15cargo_metadata = "0.11.1" 15cargo_metadata = "0.11.1"
16 16
17arena = { path = "../arena" } 17arena = { path = "../arena" }
18ra_cfg = { path = "../ra_cfg" } 18cfg = { path = "../cfg" }
19ra_db = { path = "../ra_db" } 19ra_db = { path = "../ra_db" }
20toolchain = { path = "../toolchain" } 20toolchain = { path = "../toolchain" }
21ra_proc_macro = { path = "../ra_proc_macro" } 21ra_proc_macro = { path = "../ra_proc_macro" }
diff --git a/crates/ra_project_model/src/cfg_flag.rs b/crates/ra_project_model/src/cfg_flag.rs
index bd50056c6..e92962cf6 100644
--- a/crates/ra_project_model/src/cfg_flag.rs
+++ b/crates/ra_project_model/src/cfg_flag.rs
@@ -3,7 +3,7 @@
3//! rustc main.rs --cfg foo --cfg 'feature="bar"' 3//! rustc main.rs --cfg foo --cfg 'feature="bar"'
4use std::str::FromStr; 4use std::str::FromStr;
5 5
6use ra_cfg::CfgOptions; 6use cfg::CfgOptions;
7use stdx::split_once; 7use stdx::split_once;
8 8
9#[derive(Clone, Eq, PartialEq, Debug)] 9#[derive(Clone, Eq, PartialEq, Debug)]
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 46f44910c..ee42198f3 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -12,8 +12,8 @@ use std::{
12}; 12};
13 13
14use anyhow::{bail, Context, Result}; 14use anyhow::{bail, Context, Result};
15use cfg::CfgOptions;
15use paths::{AbsPath, AbsPathBuf}; 16use paths::{AbsPath, AbsPathBuf};
16use ra_cfg::CfgOptions;
17use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId}; 17use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId};
18use rustc_hash::{FxHashMap, FxHashSet}; 18use rustc_hash::{FxHashMap, FxHashSet};
19 19
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 7713ed7ea..440b1cd13 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -42,7 +42,7 @@ syntax = { path = "../syntax" }
42text_edit = { path = "../text_edit" } 42text_edit = { path = "../text_edit" }
43vfs = { path = "../vfs" } 43vfs = { path = "../vfs" }
44vfs-notify = { path = "../vfs-notify" } 44vfs-notify = { path = "../vfs-notify" }
45ra_cfg = { path = "../ra_cfg" } 45cfg = { path = "../cfg" }
46toolchain = { path = "../toolchain" } 46toolchain = { path = "../toolchain" }
47 47
48# This should only be used in CLI 48# This should only be used in CLI
@@ -60,5 +60,5 @@ winapi = "0.3.8"
60[dev-dependencies] 60[dev-dependencies]
61expect = { path = "../expect" } 61expect = { path = "../expect" }
62test_utils = { path = "../test_utils" } 62test_utils = { path = "../test_utils" }
63mbe = { path = "../ra_mbe", package = "ra_mbe" } 63mbe = { path = "../mbe" }
64tt = { path = "../tt" } 64tt = { path = "../tt" }
diff --git a/crates/rust-analyzer/src/cargo_target_spec.rs b/crates/rust-analyzer/src/cargo_target_spec.rs
index 7929368c0..9c7a9cce6 100644
--- a/crates/rust-analyzer/src/cargo_target_spec.rs
+++ b/crates/rust-analyzer/src/cargo_target_spec.rs
@@ -1,6 +1,6 @@
1//! See `CargoTargetSpec` 1//! See `CargoTargetSpec`
2 2
3use ra_cfg::CfgExpr; 3use cfg::CfgExpr;
4use ra_ide::{FileId, RunnableKind, TestId}; 4use ra_ide::{FileId, RunnableKind, TestId};
5use ra_project_model::{self, TargetKind}; 5use ra_project_model::{self, TargetKind};
6use vfs::AbsPathBuf; 6use vfs::AbsPathBuf;
@@ -177,8 +177,8 @@ fn required_features(cfg_expr: &CfgExpr, features: &mut Vec<String>) {
177mod tests { 177mod tests {
178 use super::*; 178 use super::*;
179 179
180 use cfg::CfgExpr;
180 use mbe::ast_to_token_tree; 181 use mbe::ast_to_token_tree;
181 use ra_cfg::CfgExpr;
182 use syntax::{ 182 use syntax::{
183 ast::{self, AstNode}, 183 ast::{self, AstNode},
184 SmolStr, 184 SmolStr,