Skip to content

Commit 283e5b4

Browse files
committed
Rename the crates in source code
1 parent 11d9514 commit 283e5b4

File tree

39 files changed

+54
-52
lines changed

39 files changed

+54
-52
lines changed

src/librustc_ast_lowering/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
arena = { path = "../librustc_arena", package = "rustc_arena" }
13+
rustc_arena = { path = "../librustc_arena" }
1414
log = { version = "0.4", features = ["release_max_level_info", "std"] }
1515
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1616
rustc_hir = { path = "../librustc_hir" }

src/librustc_ast_lowering/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ mod path;
8585

8686
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
8787

88-
rustc_hir::arena_types!(::arena::declare_arena, [], 'tcx);
88+
rustc_hir::arena_types!(rustc_arena::declare_arena, [], 'tcx);
8989

9090
struct LoweringContext<'a, 'hir: 'a> {
9191
crate_root: Option<Symbol>,

src/librustc_builtin_macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
fmt_macros = { path = "../librustc_parse_format", package = "rustc_parse_format" }
13+
rustc_parse_format = { path = "../librustc_parse_format" }
1414
log = "0.4"
1515
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1616
rustc_attr = { path = "../librustc_attr" }

src/librustc_builtin_macros/asm.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use fmt_macros as parse;
2-
31
use rustc_ast::ast;
42
use rustc_ast::ptr::P;
53
use rustc_ast::token;
@@ -8,6 +6,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
86
use rustc_errors::{Applicability, DiagnosticBuilder};
97
use rustc_expand::base::{self, *};
108
use rustc_parse::parser::Parser;
9+
use rustc_parse_format as parse;
1110
use rustc_span::symbol::{kw, sym, Symbol};
1211
use rustc_span::{InnerSpan, Span};
1312

src/librustc_builtin_macros/format.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
use ArgumentType::*;
22
use Position::*;
33

4-
use fmt_macros as parse;
5-
64
use rustc_ast::ast;
75
use rustc_ast::ptr::P;
86
use rustc_ast::token;
97
use rustc_ast::tokenstream::TokenStream;
108
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
119
use rustc_errors::{pluralize, Applicability, DiagnosticBuilder};
1210
use rustc_expand::base::{self, *};
11+
use rustc_parse_format as parse;
1312
use rustc_span::symbol::{sym, Ident, Symbol};
1413
use rustc_span::{MultiSpan, Span};
1514

src/librustc_data_structures/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobserver_crate = { version = "0.1.13", package = "jobserver" }
1717
lazy_static = "1"
1818
once_cell = { version = "1", features = ["parking_lot"] }
1919
rustc_serialize = { path = "../librustc_serialize" }
20-
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
20+
rustc_graphviz = { path = "../librustc_graphviz" }
2121
cfg-if = "0.1.2"
2222
crossbeam-utils = { version = "0.7", features = ["nightly"] }
2323
stable_deref_trait = "1.0.0"

src/librustc_data_structures/obligation_forest/graphviz.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::obligation_forest::{ForestObligation, ObligationForest};
2-
use graphviz as dot;
2+
use rustc_graphviz as dot;
33
use std::env::var_os;
44
use std::fs::File;
55
use std::io::BufWriter;

src/librustc_graphviz/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//! #![feature(rustc_private)]
4141
//!
4242
//! use std::io::Write;
43-
//! use graphviz as dot;
43+
//! use rustc_graphviz as dot;
4444
//!
4545
//! type Nd = isize;
4646
//! type Ed = (isize,isize);
@@ -145,7 +145,7 @@
145145
//! #![feature(rustc_private)]
146146
//!
147147
//! use std::io::Write;
148-
//! use graphviz as dot;
148+
//! use rustc_graphviz as dot;
149149
//!
150150
//! type Nd = usize;
151151
//! type Ed<'a> = &'a (usize, usize);
@@ -207,7 +207,7 @@
207207
//! #![feature(rustc_private)]
208208
//!
209209
//! use std::io::Write;
210-
//! use graphviz as dot;
210+
//! use rustc_graphviz as dot;
211211
//!
212212
//! type Nd<'a> = (usize, &'a str);
213213
//! type Ed<'a> = (Nd<'a>, Nd<'a>);

src/librustc_incremental/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
13+
rustc_graphviz = { path = "../librustc_graphviz" }
1414
log = "0.4"
1515
rand = "0.7"
1616
rustc_middle = { path = "../librustc_middle" }

src/librustc_incremental/assert_dep_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
//! fn baz() { foo(); }
3434
//! ```
3535
36-
use graphviz as dot;
3736
use rustc_ast::ast;
3837
use rustc_data_structures::fx::FxHashSet;
3938
use rustc_data_structures::graph::implementation::{Direction, NodeIndex, INCOMING, OUTGOING};
39+
use rustc_graphviz as dot;
4040
use rustc_hir as hir;
4141
use rustc_hir::def_id::DefId;
4242
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};

src/librustc_infer/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
graphviz = { path = "../librustc_graphviz", package = "rustc_graphviz" }
13+
rustc_graphviz = { path = "../librustc_graphviz" }
1414
log = { version = "0.4", features = ["release_max_level_info", "std"] }
1515
rustc_middle = { path = "../librustc_middle" }
1616
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_middle/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
arena = { path = "../librustc_arena", package = "rustc_arena" }
13+
rustc_arena = { path = "../librustc_arena" }
1414
bitflags = "1.2.1"
1515
scoped-tls = "1.0"
1616
log = { version = "0.4", features = ["release_max_level_info", "std"] }

src/librustc_middle/arena.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ macro_rules! arena_types {
8888
)
8989
}
9090

91-
arena_types!(arena::declare_arena, [], 'tcx);
91+
arena_types!(rustc_arena::declare_arena, [], 'tcx);

src/librustc_mir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111

1212
[dependencies]
1313
either = "1.5.0"
14-
dot = { path = "../librustc_graphviz", package = "rustc_graphviz" }
14+
rustc_graphviz = { path = "../librustc_graphviz" }
1515
itertools = "0.8"
1616
log = "0.4"
1717
log_settings = "0.1.1"

src/librustc_mir/borrow_check/region_infer/graphviz.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::io::{self, Write};
77

88
use super::*;
99
use crate::borrow_check::constraints::OutlivesConstraint;
10+
use rustc_graphviz as dot;
1011

1112
impl<'tcx> RegionInferenceContext<'tcx> {
1213
/// Write out the region constraint graph.

src/librustc_mir/dataflow/framework/engine.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::path::PathBuf;
66

77
use rustc_ast::ast;
88
use rustc_data_structures::work_queue::WorkQueue;
9+
use rustc_graphviz as dot;
910
use rustc_hir::def_id::DefId;
1011
use rustc_index::bit_set::BitSet;
1112
use rustc_index::vec::IndexVec;

src/librustc_mir/dataflow/framework/graphviz.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use std::cell::RefCell;
44
use std::{io, ops, str};
55

6+
use rustc_graphviz as dot;
67
use rustc_hir::def_id::DefId;
78
use rustc_index::bit_set::{BitSet, HybridBitSet};
89
use rustc_index::vec::{Idx, IndexVec};

src/librustc_mir/util/graphviz.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use rustc_graphviz as dot;
12
use rustc_hir::def_id::DefId;
23
use rustc_index::vec::Idx;
34
use rustc_middle::mir::*;

src/librustc_mir_build/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
arena = { path = "../librustc_arena", package = "rustc_arena" }
13+
rustc_arena = { path = "../librustc_arena" }
1414
log = "0.4"
1515
rustc_middle = { path = "../librustc_middle" }
1616
rustc_apfloat = { path = "../librustc_apfloat" }

src/librustc_mir_build/hair/pattern/_match.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ use rustc_index::vec::Idx;
280280
use super::{compare_const_vals, PatternFoldable, PatternFolder};
281281
use super::{FieldPat, Pat, PatKind, PatRange};
282282

283+
use rustc_arena::TypedArena;
283284
use rustc_attr::{SignedInt, UnsignedInt};
284285
use rustc_errors::ErrorReported;
285286
use rustc_hir::def_id::DefId;
@@ -292,8 +293,6 @@ use rustc_session::lint;
292293
use rustc_span::{Span, DUMMY_SP};
293294
use rustc_target::abi::{Integer, Size, VariantIdx};
294295

295-
use arena::TypedArena;
296-
297296
use smallvec::{smallvec, SmallVec};
298297
use std::borrow::Cow;
299298
use std::cmp::{self, max, min, Ordering};

src/librustc_mir_build/hair/pattern/check_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::_match::WitnessPreference::*;
33
use super::_match::{expand_pattern, is_useful, MatchCheckCtxt, Matrix, PatStack};
44
use super::{PatCtxt, PatKind, PatternError};
55

6-
use arena::TypedArena;
6+
use rustc_arena::TypedArena;
77
use rustc_ast::ast::Mutability;
88
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder};
99
use rustc_hir as hir;

src/librustc_query_system/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
arena = { path = "../librustc_arena", package = "rustc_arena" }
13+
rustc_arena = { path = "../librustc_arena" }
1414
log = { version = "0.4", features = ["release_max_level_info", "std"] }
1515
rustc-rayon-core = "0.3.0"
1616
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_query_system/query/caches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::dep_graph::DepNodeIndex;
22
use crate::query::plumbing::{QueryLookup, QueryState};
33
use crate::query::QueryContext;
44

5-
use arena::TypedArena;
5+
use rustc_arena::TypedArena;
66
use rustc_data_structures::fx::FxHashMap;
77
use rustc_data_structures::sharded::Sharded;
88
use rustc_data_structures::sync::WorkerLocal;

src/librustc_resolve/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ doctest = false
1414
bitflags = "1.2.1"
1515
log = "0.4"
1616
rustc_ast = { path = "../librustc_ast" }
17-
arena = { path = "../librustc_arena", package = "rustc_arena" }
17+
rustc_arena = { path = "../librustc_arena" }
1818
rustc_middle = { path = "../librustc_middle" }
1919
rustc_ast_lowering = { path = "../librustc_ast_lowering" }
2020
rustc_ast_pretty = { path = "../librustc_ast_pretty" }

src/librustc_resolve/lib.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub use rustc_hir::def::{Namespace, PerNS};
1919

2020
use Determinacy::*;
2121

22+
use rustc_arena::TypedArena;
2223
use rustc_ast::ast::{self, FloatTy, IntTy, NodeId, UintTy};
2324
use rustc_ast::ast::{Crate, CRATE_NODE_ID};
2425
use rustc_ast::ast::{ItemKind, Path};
@@ -981,13 +982,13 @@ pub struct Resolver<'a> {
981982
/// Nothing really interesting here; it just provides memory for the rest of the crate.
982983
#[derive(Default)]
983984
pub struct ResolverArenas<'a> {
984-
modules: arena::TypedArena<ModuleData<'a>>,
985+
modules: TypedArena<ModuleData<'a>>,
985986
local_modules: RefCell<Vec<Module<'a>>>,
986-
name_bindings: arena::TypedArena<NameBinding<'a>>,
987-
imports: arena::TypedArena<Import<'a>>,
988-
name_resolutions: arena::TypedArena<RefCell<NameResolution<'a>>>,
989-
macro_rules_bindings: arena::TypedArena<MacroRulesBinding<'a>>,
990-
ast_paths: arena::TypedArena<ast::Path>,
987+
name_bindings: TypedArena<NameBinding<'a>>,
988+
imports: TypedArena<Import<'a>>,
989+
name_resolutions: TypedArena<RefCell<NameResolution<'a>>>,
990+
macro_rules_bindings: TypedArena<MacroRulesBinding<'a>>,
991+
ast_paths: TypedArena<ast::Path>,
991992
}
992993

993994
impl<'a> ResolverArenas<'a> {

src/librustc_span/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rustc_serialize = { path = "../librustc_serialize" }
1414
rustc_macros = { path = "../librustc_macros" }
1515
rustc_data_structures = { path = "../librustc_data_structures" }
1616
rustc_index = { path = "../librustc_index" }
17-
arena = { path = "../librustc_arena", package = "rustc_arena" }
17+
rustc_arena = { path = "../librustc_arena" }
1818
scoped-tls = "1.0"
1919
unicode-width = "0.1.4"
2020
cfg-if = "0.1.2"

src/librustc_span/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! allows bidirectional lookup; i.e., given a value, one can easily find the
33
//! type, and vice versa.
44
5-
use arena::DroplessArena;
5+
use rustc_arena::DroplessArena;
66
use rustc_data_structures::fx::FxHashMap;
77
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
88
use rustc_macros::{symbols, HashStable_Generic};

src/librustc_trait_selection/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
fmt_macros = { path = "../librustc_parse_format", package = "rustc_parse_format" }
13+
rustc_parse_format = { path = "../librustc_parse_format" }
1414
log = { version = "0.4", features = ["release_max_level_info", "std"] }
1515
rustc_attr = { path = "../librustc_attr" }
1616
rustc_middle = { path = "../librustc_middle" }

src/librustc_trait_selection/traits/on_unimplemented.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
use fmt_macros::{ParseMode, Parser, Piece, Position};
2-
31
use rustc_ast::ast::{MetaItem, NestedMetaItem};
42
use rustc_attr as attr;
53
use rustc_data_structures::fx::FxHashMap;
64
use rustc_errors::{struct_span_err, ErrorReported};
75
use rustc_hir::def_id::DefId;
86
use rustc_middle::ty::{self, GenericParamDefKind, TyCtxt};
7+
use rustc_parse_format::{ParseMode, Parser, Piece, Position};
98
use rustc_span::symbol::{kw, sym, Symbol};
109
use rustc_span::Span;
1110

src/librustc_typeck/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test = false
1111
doctest = false
1212

1313
[dependencies]
14-
arena = { path = "../librustc_arena", package = "rustc_arena" }
14+
rustc_arena = { path = "../librustc_arena" }
1515
log = "0.4"
1616
rustc_middle = { path = "../librustc_middle" }
1717
rustc_attr = { path = "../librustc_attr" }

src/librustc_typeck/variance/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/variance.html
55
66
use hir::Node;
7+
use rustc_arena::TypedArena;
78
use rustc_hir as hir;
89
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
910
use rustc_middle::ty::query::Providers;
@@ -31,7 +32,7 @@ pub fn provide(providers: &mut Providers<'_>) {
3132

3233
fn crate_variances(tcx: TyCtxt<'_>, crate_num: CrateNum) -> CrateVariancesMap<'_> {
3334
assert_eq!(crate_num, LOCAL_CRATE);
34-
let mut arena = arena::TypedArena::default();
35+
let mut arena = TypedArena::default();
3536
let terms_cx = terms::determine_parameters_to_be_inferred(tcx, &mut arena);
3637
let constraints_cx = constraints::add_constraints_from_crate(terms_cx);
3738
solve::solve_constraints(constraints_cx)

src/librustc_typeck/variance/terms.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// `InferredIndex` is a newtype'd int representing the index of such
1010
// a variable.
1111

12-
use arena::TypedArena;
12+
use rustc_arena::TypedArena;
1313
use rustc_hir as hir;
1414
use rustc_hir::itemlikevisit::ItemLikeVisitor;
1515
use rustc_hir::HirIdMap;

src/test/run-make-fulldeps/save-analysis-fail/foo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#![feature(box_syntax)]
33
#![feature(rustc_private)]
44

5-
extern crate graphviz;
5+
extern crate rustc_graphviz;
66
// A simple rust project
77

88
extern crate krate2;
99
extern crate krate2 as krate3;
1010

11-
use graphviz::RenderOption;
11+
use rustc_graphviz::RenderOption;
1212
use std::collections::{HashMap,HashSet};
1313
use std::cell::RefCell;
1414
use std::io::Write;

src/test/run-make-fulldeps/save-analysis/foo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#![feature(associated_type_defaults)]
55
#![feature(external_doc)]
66

7-
extern crate graphviz;
7+
extern crate rustc_graphviz;
88
// A simple rust project
99

1010
extern crate krate2;
1111
extern crate krate2 as krate3;
1212

13-
use graphviz::RenderOption;
13+
use rustc_graphviz::RenderOption;
1414
use std::collections::{HashMap,HashSet};
1515
use std::cell::RefCell;
1616
use std::io::Write;

src/test/ui-fulldeps/dropck-tarena-cycle-checked.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#![feature(rustc_private)]
1010

11-
extern crate arena;
11+
extern crate rustc_arena;
1212

13-
use arena::TypedArena;
13+
use rustc_arena::TypedArena;
1414
use std::cell::Cell;
1515
use id::Id;
1616

0 commit comments

Comments
 (0)