Rename the crates in source code

This commit is contained in:
Vadim Petrochenkov 2020-06-02 20:19:49 +03:00
parent 11d951492c
commit 283e5b4106
39 changed files with 54 additions and 52 deletions

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
log = { version = "0.4", features = ["release_max_level_info", "std"] }
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_hir = { path = "../librustc_hir" }

View File

@ -85,7 +85,7 @@ mod path;
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
rustc_hir::arena_types!(::arena::declare_arena, [], 'tcx);
rustc_hir::arena_types!(rustc_arena::declare_arena, [], 'tcx);
struct LoweringContext<'a, 'hir: 'a> {
crate_root: Option<Symbol>,

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
fmt_macros = { path = "../librustc_parse_format", package = "rustc_parse_format" }
rustc_parse_format = { path = "../librustc_parse_format" }
log = "0.4"
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_attr = { path = "../librustc_attr" }

View File

@ -1,5 +1,3 @@
use fmt_macros as parse;
use rustc_ast::ast;
use rustc_ast::ptr::P;
use rustc_ast::token;
@ -8,6 +6,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_expand::base::{self, *};
use rustc_parse::parser::Parser;
use rustc_parse_format as parse;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::{InnerSpan, Span};

View File

@ -1,8 +1,6 @@
use ArgumentType::*;
use Position::*;
use fmt_macros as parse;
use rustc_ast::ast;
use rustc_ast::ptr::P;
use rustc_ast::token;
@ -10,6 +8,7 @@ use rustc_ast::tokenstream::TokenStream;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{pluralize, Applicability, DiagnosticBuilder};
use rustc_expand::base::{self, *};
use rustc_parse_format as parse;
use rustc_span::symbol::{sym, Ident, Symbol};
use rustc_span::{MultiSpan, Span};

View File

@ -17,7 +17,7 @@ jobserver_crate = { version = "0.1.13", package = "jobserver" }
lazy_static = "1"
once_cell = { version = "1", features = ["parking_lot"] }
rustc_serialize = { path = "../librustc_serialize" }
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
rustc_graphviz = { path = "../librustc_graphviz" }
cfg-if = "0.1.2"
crossbeam-utils = { version = "0.7", features = ["nightly"] }
stable_deref_trait = "1.0.0"

View File

@ -1,5 +1,5 @@
use crate::obligation_forest::{ForestObligation, ObligationForest};
use graphviz as dot;
use rustc_graphviz as dot;
use std::env::var_os;
use std::fs::File;
use std::io::BufWriter;

View File

@ -40,7 +40,7 @@
//! #![feature(rustc_private)]
//!
//! use std::io::Write;
//! use graphviz as dot;
//! use rustc_graphviz as dot;
//!
//! type Nd = isize;
//! type Ed = (isize,isize);
@ -145,7 +145,7 @@
//! #![feature(rustc_private)]
//!
//! use std::io::Write;
//! use graphviz as dot;
//! use rustc_graphviz as dot;
//!
//! type Nd = usize;
//! type Ed<'a> = &'a (usize, usize);
@ -207,7 +207,7 @@
//! #![feature(rustc_private)]
//!
//! use std::io::Write;
//! use graphviz as dot;
//! use rustc_graphviz as dot;
//!
//! type Nd<'a> = (usize, &'a str);
//! type Ed<'a> = (Nd<'a>, Nd<'a>);

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
rustc_graphviz = { path = "../librustc_graphviz" }
log = "0.4"
rand = "0.7"
rustc_middle = { path = "../librustc_middle" }

View File

@ -33,10 +33,10 @@
//! fn baz() { foo(); }
//! ```
use graphviz as dot;
use rustc_ast::ast;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::graph::implementation::{Direction, NodeIndex, INCOMING, OUTGOING};
use rustc_graphviz as dot;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
rustc_graphviz = { path = "../librustc_graphviz" }
log = { version = "0.4", features = ["release_max_level_info", "std"] }
rustc_middle = { path = "../librustc_middle" }
rustc_data_structures = { path = "../librustc_data_structures" }

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
bitflags = "1.2.1"
scoped-tls = "1.0"
log = { version = "0.4", features = ["release_max_level_info", "std"] }

View File

@ -88,4 +88,4 @@ macro_rules! arena_types {
)
}
arena_types!(arena::declare_arena, [], 'tcx);
arena_types!(rustc_arena::declare_arena, [], 'tcx);

View File

@ -11,7 +11,7 @@ doctest = false
[dependencies]
either = "1.5.0"
dot = { path = "../librustc_graphviz", package = "rustc_graphviz" }
rustc_graphviz = { path = "../librustc_graphviz" }
itertools = "0.8"
log = "0.4"
log_settings = "0.1.1"

View File

@ -7,6 +7,7 @@ use std::io::{self, Write};
use super::*;
use crate::borrow_check::constraints::OutlivesConstraint;
use rustc_graphviz as dot;
impl<'tcx> RegionInferenceContext<'tcx> {
/// Write out the region constraint graph.

View File

@ -6,6 +6,7 @@ use std::path::PathBuf;
use rustc_ast::ast;
use rustc_data_structures::work_queue::WorkQueue;
use rustc_graphviz as dot;
use rustc_hir::def_id::DefId;
use rustc_index::bit_set::BitSet;
use rustc_index::vec::IndexVec;

View File

@ -3,6 +3,7 @@
use std::cell::RefCell;
use std::{io, ops, str};
use rustc_graphviz as dot;
use rustc_hir::def_id::DefId;
use rustc_index::bit_set::{BitSet, HybridBitSet};
use rustc_index::vec::{Idx, IndexVec};

View File

@ -1,3 +1,4 @@
use rustc_graphviz as dot;
use rustc_hir::def_id::DefId;
use rustc_index::vec::Idx;
use rustc_middle::mir::*;

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
log = "0.4"
rustc_middle = { path = "../librustc_middle" }
rustc_apfloat = { path = "../librustc_apfloat" }

View File

@ -280,6 +280,7 @@ use rustc_index::vec::Idx;
use super::{compare_const_vals, PatternFoldable, PatternFolder};
use super::{FieldPat, Pat, PatKind, PatRange};
use rustc_arena::TypedArena;
use rustc_attr::{SignedInt, UnsignedInt};
use rustc_errors::ErrorReported;
use rustc_hir::def_id::DefId;
@ -292,8 +293,6 @@ use rustc_session::lint;
use rustc_span::{Span, DUMMY_SP};
use rustc_target::abi::{Integer, Size, VariantIdx};
use arena::TypedArena;
use smallvec::{smallvec, SmallVec};
use std::borrow::Cow;
use std::cmp::{self, max, min, Ordering};

View File

@ -3,7 +3,7 @@ use super::_match::WitnessPreference::*;
use super::_match::{expand_pattern, is_useful, MatchCheckCtxt, Matrix, PatStack};
use super::{PatCtxt, PatKind, PatternError};
use arena::TypedArena;
use rustc_arena::TypedArena;
use rustc_ast::ast::Mutability;
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir as hir;

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
log = { version = "0.4", features = ["release_max_level_info", "std"] }
rustc-rayon-core = "0.3.0"
rustc_data_structures = { path = "../librustc_data_structures" }

View File

@ -2,7 +2,7 @@ use crate::dep_graph::DepNodeIndex;
use crate::query::plumbing::{QueryLookup, QueryState};
use crate::query::QueryContext;
use arena::TypedArena;
use rustc_arena::TypedArena;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sharded::Sharded;
use rustc_data_structures::sync::WorkerLocal;

View File

@ -14,7 +14,7 @@ doctest = false
bitflags = "1.2.1"
log = "0.4"
rustc_ast = { path = "../librustc_ast" }
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
rustc_middle = { path = "../librustc_middle" }
rustc_ast_lowering = { path = "../librustc_ast_lowering" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" }

View File

@ -19,6 +19,7 @@ pub use rustc_hir::def::{Namespace, PerNS};
use Determinacy::*;
use rustc_arena::TypedArena;
use rustc_ast::ast::{self, FloatTy, IntTy, NodeId, UintTy};
use rustc_ast::ast::{Crate, CRATE_NODE_ID};
use rustc_ast::ast::{ItemKind, Path};
@ -981,13 +982,13 @@ pub struct Resolver<'a> {
/// Nothing really interesting here; it just provides memory for the rest of the crate.
#[derive(Default)]
pub struct ResolverArenas<'a> {
modules: arena::TypedArena<ModuleData<'a>>,
modules: TypedArena<ModuleData<'a>>,
local_modules: RefCell<Vec<Module<'a>>>,
name_bindings: arena::TypedArena<NameBinding<'a>>,
imports: arena::TypedArena<Import<'a>>,
name_resolutions: arena::TypedArena<RefCell<NameResolution<'a>>>,
macro_rules_bindings: arena::TypedArena<MacroRulesBinding<'a>>,
ast_paths: arena::TypedArena<ast::Path>,
name_bindings: TypedArena<NameBinding<'a>>,
imports: TypedArena<Import<'a>>,
name_resolutions: TypedArena<RefCell<NameResolution<'a>>>,
macro_rules_bindings: TypedArena<MacroRulesBinding<'a>>,
ast_paths: TypedArena<ast::Path>,
}
impl<'a> ResolverArenas<'a> {

View File

@ -14,7 +14,7 @@ rustc_serialize = { path = "../librustc_serialize" }
rustc_macros = { path = "../librustc_macros" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_index = { path = "../librustc_index" }
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
scoped-tls = "1.0"
unicode-width = "0.1.4"
cfg-if = "0.1.2"

View File

@ -2,7 +2,7 @@
//! allows bidirectional lookup; i.e., given a value, one can easily find the
//! type, and vice versa.
use arena::DroplessArena;
use rustc_arena::DroplessArena;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_macros::{symbols, HashStable_Generic};

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
fmt_macros = { path = "../librustc_parse_format", package = "rustc_parse_format" }
rustc_parse_format = { path = "../librustc_parse_format" }
log = { version = "0.4", features = ["release_max_level_info", "std"] }
rustc_attr = { path = "../librustc_attr" }
rustc_middle = { path = "../librustc_middle" }

View File

@ -1,11 +1,10 @@
use fmt_macros::{ParseMode, Parser, Piece, Position};
use rustc_ast::ast::{MetaItem, NestedMetaItem};
use rustc_attr as attr;
use rustc_data_structures::fx::FxHashMap;
use rustc_errors::{struct_span_err, ErrorReported};
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, GenericParamDefKind, TyCtxt};
use rustc_parse_format::{ParseMode, Parser, Piece, Position};
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;

View File

@ -11,7 +11,7 @@ test = false
doctest = false
[dependencies]
arena = { path = "../librustc_arena", package = "rustc_arena" }
rustc_arena = { path = "../librustc_arena" }
log = "0.4"
rustc_middle = { path = "../librustc_middle" }
rustc_attr = { path = "../librustc_attr" }

View File

@ -4,6 +4,7 @@
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/variance.html
use hir::Node;
use rustc_arena::TypedArena;
use rustc_hir as hir;
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc_middle::ty::query::Providers;
@ -31,7 +32,7 @@ pub fn provide(providers: &mut Providers<'_>) {
fn crate_variances(tcx: TyCtxt<'_>, crate_num: CrateNum) -> CrateVariancesMap<'_> {
assert_eq!(crate_num, LOCAL_CRATE);
let mut arena = arena::TypedArena::default();
let mut arena = TypedArena::default();
let terms_cx = terms::determine_parameters_to_be_inferred(tcx, &mut arena);
let constraints_cx = constraints::add_constraints_from_crate(terms_cx);
solve::solve_constraints(constraints_cx)

View File

@ -9,7 +9,7 @@
// `InferredIndex` is a newtype'd int representing the index of such
// a variable.
use arena::TypedArena;
use rustc_arena::TypedArena;
use rustc_hir as hir;
use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_hir::HirIdMap;

View File

@ -2,13 +2,13 @@
#![feature(box_syntax)]
#![feature(rustc_private)]
extern crate graphviz;
extern crate rustc_graphviz;
// A simple rust project
extern crate krate2;
extern crate krate2 as krate3;
use graphviz::RenderOption;
use rustc_graphviz::RenderOption;
use std::collections::{HashMap,HashSet};
use std::cell::RefCell;
use std::io::Write;

View File

@ -4,13 +4,13 @@
#![feature(associated_type_defaults)]
#![feature(external_doc)]
extern crate graphviz;
extern crate rustc_graphviz;
// A simple rust project
extern crate krate2;
extern crate krate2 as krate3;
use graphviz::RenderOption;
use rustc_graphviz::RenderOption;
use std::collections::{HashMap,HashSet};
use std::cell::RefCell;
use std::io::Write;

View File

@ -8,9 +8,9 @@
#![feature(rustc_private)]
extern crate arena;
extern crate rustc_arena;
use arena::TypedArena;
use rustc_arena::TypedArena;
use std::cell::Cell;
use id::Id;

View File

@ -11,9 +11,9 @@
#![feature(rustc_private)]
extern crate arena;
extern crate rustc_arena;
use arena::TypedArena;
use rustc_arena::TypedArena;
trait HasId { fn count(&self) -> usize; }

View File

@ -12,9 +12,9 @@
#![allow(unstable)]
#![feature(rustc_private)]
extern crate arena;
extern crate rustc_arena;
use arena::TypedArena;
use rustc_arena::TypedArena;
trait HasId { fn count(&self) -> usize; }

View File

@ -11,12 +11,12 @@
#![feature(rustc_private, libc)]
extern crate arena;
extern crate rustc_arena;
extern crate libc;
use TypeStructure::{TypeInt, TypeFunction};
use AstKind::{ExprInt, ExprVar, ExprLambda};
use arena::TypedArena;
use rustc_arena::TypedArena;
use std::collections::HashMap;
use std::mem;

View File

@ -352,7 +352,7 @@ impl Write {
tts: &TokenStream,
is_write: bool,
) -> (Option<StrLit>, Option<Expr>) {
use fmt_macros::{
use rustc_parse_format::{
AlignUnknown, ArgumentImplicitlyIs, ArgumentIs, ArgumentNamed, CountImplied, FormatSpec, ParseMode, Parser,
Piece,
};