Rename ra_cfg -> cfg

This commit is contained in:
Aleksey Kladov 2020-08-13 10:19:09 +02:00
parent 5734cc8586
commit 68c2238725
22 changed files with 39 additions and 39 deletions

30
Cargo.lock generated
View file

@ -112,6 +112,16 @@ version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"
[[package]]
name = "cfg"
version = "0.0.0"
dependencies = [
"mbe",
"rustc-hash",
"syntax",
"tt",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
@ -955,22 +965,12 @@ dependencies = [
"text_edit",
]
[[package]]
name = "ra_cfg"
version = "0.1.0"
dependencies = [
"mbe",
"rustc-hash",
"syntax",
"tt",
]
[[package]]
name = "ra_db"
version = "0.1.0"
dependencies = [
"cfg",
"profile",
"ra_cfg",
"rustc-hash",
"salsa",
"stdx",
@ -1012,6 +1012,7 @@ version = "0.1.0"
dependencies = [
"anymap",
"arena",
"cfg",
"drop_bomb",
"either",
"expect",
@ -1022,7 +1023,6 @@ dependencies = [
"mbe",
"once_cell",
"profile",
"ra_cfg",
"ra_db",
"ra_hir_expand",
"rustc-hash",
@ -1082,6 +1082,7 @@ dependencies = [
name = "ra_ide"
version = "0.1.0"
dependencies = [
"cfg",
"either",
"expect",
"indexmap",
@ -1090,7 +1091,6 @@ dependencies = [
"oorandom",
"profile",
"ra_assists",
"ra_cfg",
"ra_db",
"ra_fmt",
"ra_hir",
@ -1141,9 +1141,9 @@ dependencies = [
"anyhow",
"arena",
"cargo_metadata",
"cfg",
"log",
"paths",
"ra_cfg",
"ra_db",
"ra_proc_macro",
"rustc-hash",
@ -1240,6 +1240,7 @@ name = "rust-analyzer"
version = "0.1.0"
dependencies = [
"anyhow",
"cfg",
"crossbeam-channel",
"env_logger",
"expect",
@ -1256,7 +1257,6 @@ dependencies = [
"pico-args",
"proc_macro_srv",
"profile",
"ra_cfg",
"ra_db",
"ra_hir",
"ra_hir_def",

View file

@ -1,9 +1,9 @@
[package]
edition = "2018"
name = "ra_cfg"
version = "0.1.0"
authors = ["rust-analyzer developers"]
name = "cfg"
version = "0.0.0"
license = "MIT OR Apache-2.0"
authors = ["rust-analyzer developers"]
edition = "2018"
[lib]
doctest = false

View file

@ -1,4 +1,4 @@
//! ra_cfg defines conditional compiling options, `cfg` attibute parser and evaluator
//! cfg defines conditional compiling options, `cfg` attibute parser and evaluator
mod cfg_expr;

View file

@ -13,7 +13,7 @@ salsa = "0.15.2"
rustc-hash = "1.1.0"
syntax = { path = "../syntax" }
ra_cfg = { path = "../ra_cfg" }
cfg = { path = "../cfg" }
profile = { path = "../profile" }
tt = { path = "../tt" }
test_utils = { path = "../test_utils" }

View file

@ -59,7 +59,7 @@
//! ```
use std::{str::FromStr, sync::Arc};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use rustc_hash::FxHashMap;
use test_utils::{extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER};
use vfs::{file_set::FileSet, VfsPath};

View file

@ -8,7 +8,7 @@
use std::{fmt, iter::FromIterator, ops, str::FromStr, sync::Arc};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use rustc_hash::{FxHashMap, FxHashSet};
use syntax::SmolStr;
use tt::TokenExpander;

View file

@ -29,7 +29,7 @@ profile = { path = "../profile" }
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
test_utils = { path = "../test_utils" }
mbe = { path = "../mbe" }
ra_cfg = { path = "../ra_cfg" }
cfg = { path = "../cfg" }
tt = { path = "../tt" }
[dev-dependencies]

View file

@ -23,7 +23,7 @@
EnumId, HasModule, LocalEnumVariantId, LocalFieldId, Lookup, ModuleId, StructId, UnionId,
VariantId,
};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
/// Note that we use `StructData` for unions as well!
#[derive(Debug, Clone, PartialEq, Eq)]

View file

@ -5,7 +5,7 @@
use either::Either;
use hir_expand::{hygiene::Hygiene, AstId, InFile};
use mbe::ast_to_token_tree;
use ra_cfg::{CfgExpr, CfgOptions};
use cfg::{CfgExpr, CfgOptions};
use syntax::{
ast::{self, AstNode, AttrsOwner},
SmolStr,

View file

@ -9,7 +9,7 @@
use drop_bomb::DropBomb;
use either::Either;
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::CrateId;
use rustc_hash::FxHashMap;
use syntax::{ast, AstNode, AstPtr};

View file

@ -11,7 +11,7 @@
proc_macro::ProcMacroExpander,
HirFileId, MacroCallId, MacroDefId, MacroDefKind,
};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::{CrateId, FileId, ProcMacroId};
use rustc_hash::FxHashMap;
use syntax::ast;

View file

@ -25,7 +25,7 @@ syntax = { path = "../syntax" }
text_edit = { path = "../text_edit" }
ra_db = { path = "../ra_db" }
ra_ide_db = { path = "../ra_ide_db" }
ra_cfg = { path = "../ra_cfg" }
cfg = { path = "../cfg" }
ra_fmt = { path = "../ra_fmt" }
profile = { path = "../profile" }
test_utils = { path = "../test_utils" }

View file

@ -47,7 +47,7 @@ macro_rules! eprintln {
use std::sync::Arc;
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::{
salsa::{self, ParallelDatabase},
CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath,

View file

@ -1,7 +1,7 @@
//! FIXME: write short doc here
use std::sync::Arc;
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::{CrateName, FileSet, SourceRoot, VfsPath};
use test_utils::{
extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER,

View file

@ -63,7 +63,7 @@ pub(crate) fn crate_for(db: &RootDatabase, file_id: FileId) -> Vec<CrateId> {
#[cfg(test)]
mod tests {
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::Env;
use test_utils::mark;

View file

@ -2,7 +2,7 @@
use hir::{AsAssocItem, Attrs, HirFileId, InFile, Semantics};
use itertools::Itertools;
use ra_cfg::CfgExpr;
use cfg::CfgExpr;
use ra_ide_db::RootDatabase;
use syntax::{
ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner},

View file

@ -15,7 +15,7 @@ rustc-hash = "1.1.0"
cargo_metadata = "0.11.1"
arena = { path = "../arena" }
ra_cfg = { path = "../ra_cfg" }
cfg = { path = "../cfg" }
ra_db = { path = "../ra_db" }
toolchain = { path = "../toolchain" }
ra_proc_macro = { path = "../ra_proc_macro" }

View file

@ -3,7 +3,7 @@
//! rustc main.rs --cfg foo --cfg 'feature="bar"'
use std::str::FromStr;
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use stdx::split_once;
#[derive(Clone, Eq, PartialEq, Debug)]

View file

@ -13,7 +13,7 @@
use anyhow::{bail, Context, Result};
use paths::{AbsPath, AbsPathBuf};
use ra_cfg::CfgOptions;
use cfg::CfgOptions;
use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId};
use rustc_hash::{FxHashMap, FxHashSet};

View file

@ -42,7 +42,7 @@ syntax = { path = "../syntax" }
text_edit = { path = "../text_edit" }
vfs = { path = "../vfs" }
vfs-notify = { path = "../vfs-notify" }
ra_cfg = { path = "../ra_cfg" }
cfg = { path = "../cfg" }
toolchain = { path = "../toolchain" }
# This should only be used in CLI

View file

@ -1,6 +1,6 @@
//! See `CargoTargetSpec`
use ra_cfg::CfgExpr;
use cfg::CfgExpr;
use ra_ide::{FileId, RunnableKind, TestId};
use ra_project_model::{self, TargetKind};
use vfs::AbsPathBuf;
@ -178,7 +178,7 @@ mod tests {
use super::*;
use mbe::ast_to_token_tree;
use ra_cfg::CfgExpr;
use cfg::CfgExpr;
use syntax::{
ast::{self, AstNode},
SmolStr,