mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-11 20:58:54 +00:00
Rename ra_cfg -> cfg
This commit is contained in:
parent
5734cc8586
commit
68c2238725
22 changed files with 39 additions and 39 deletions
30
Cargo.lock
generated
30
Cargo.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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
|
|
@ -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;
|
||||
|
|
@ -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" }
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -23,7 +23,7 @@ use crate::{
|
|||
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)]
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{ops, sync::Arc};
|
|||
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,
|
||||
|
|
|
@ -9,7 +9,7 @@ use arena::{map::ArenaMap, Arena};
|
|||
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};
|
||||
|
|
|
@ -11,7 +11,7 @@ use hir_expand::{
|
|||
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;
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -47,7 +47,7 @@ mod typing;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_cfg::CfgOptions;
|
||||
use cfg::CfgOptions;
|
||||
use ra_db::{
|
||||
salsa::{self, ParallelDatabase},
|
||||
CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::fmt;
|
|||
|
||||
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},
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::{
|
|||
|
||||
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};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue