Skip to content

Commit 118b505

Browse files
committed
Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
Rename all remaining compiler crates to use the `rustc_foo` pattern libarena -> librustc_arena libfmt_macros -> librustc_parse_format libgraphviz -> librustc_graphviz libserialize -> librustc_serialize Closes #71177 in particular.
2 parents 826cb06 + e793b46 commit 118b505

File tree

91 files changed

+178
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+178
-185
lines changed

Cargo.lock

+62-62
Large diffs are not rendered by default.

src/libarena/Cargo.toml src/librustc_arena/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "arena"
3+
name = "rustc_arena"
44
version = "0.0.0"
55
edition = "2018"
66

77
[lib]
8-
name = "arena"
8+
name = "rustc_arena"
99
path = "lib.rs"
1010

1111
[dependencies]
File renamed without changes.
File renamed without changes.

src/librustc_ast/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-
rustc_serialize = { path = "../libserialize", package = "serialize" }
13+
rustc_serialize = { path = "../librustc_serialize" }
1414
log = "0.4"
1515
scoped-tls = "1.0"
1616
rustc_span = { path = "../librustc_span" }

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 = "../libarena" }
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_attr/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ doctest = false
1212

1313
[dependencies]
1414
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
15-
rustc_serialize = { path = "../libserialize", package = "serialize" }
15+
rustc_serialize = { path = "../librustc_serialize" }
1616
rustc_errors = { path = "../librustc_errors" }
1717
rustc_span = { path = "../librustc_span" }
1818
rustc_data_structures = { path = "../librustc_data_structures" }

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 = "../libfmt_macros" }
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_codegen_llvm/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rustc_incremental = { path = "../librustc_incremental" }
2929
rustc_index = { path = "../librustc_index" }
3030
rustc_llvm = { path = "../librustc_llvm" }
3131
rustc_session = { path = "../librustc_session" }
32-
rustc_serialize = { path = "../libserialize", package = "serialize" }
32+
rustc_serialize = { path = "../librustc_serialize" }
3333
rustc_target = { path = "../librustc_target" }
3434
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
3535
rustc_ast = { path = "../librustc_ast" }

src/librustc_codegen_ssa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ libc = "0.2.50"
1919
jobserver = "0.1.11"
2020
tempfile = "3.1"
2121

22-
rustc_serialize = { path = "../libserialize", package = "serialize" }
22+
rustc_serialize = { path = "../librustc_serialize" }
2323
rustc_ast = { path = "../librustc_ast" }
2424
rustc_span = { path = "../librustc_span" }
2525
rustc_middle = { path = "../librustc_middle" }

src/librustc_data_structures/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ log = "0.4"
1616
jobserver_crate = { version = "0.1.13", package = "jobserver" }
1717
lazy_static = "1"
1818
once_cell = { version = "1", features = ["parking_lot"] }
19-
rustc_serialize = { path = "../libserialize", package = "serialize" }
20-
graphviz = { path = "../libgraphviz" }
19+
rustc_serialize = { path = "../librustc_serialize" }
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_driver/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ rustc_codegen_ssa = { path = "../librustc_codegen_ssa" }
3232
rustc_session = { path = "../librustc_session" }
3333
rustc_error_codes = { path = "../librustc_error_codes" }
3434
rustc_interface = { path = "../librustc_interface" }
35-
rustc_serialize = { path = "../libserialize", package = "serialize" }
35+
rustc_serialize = { path = "../librustc_serialize" }
3636
rustc_ast = { path = "../librustc_ast" }
3737
rustc_span = { path = "../librustc_span" }
3838

src/librustc_errors/Cargo.toml

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

1212
[dependencies]
1313
log = "0.4"
14-
rustc_serialize = { path = "../libserialize", package = "serialize" }
14+
rustc_serialize = { path = "../librustc_serialize" }
1515
rustc_span = { path = "../librustc_span" }
1616
rustc_data_structures = { path = "../librustc_data_structures" }
1717
unicode-width = "0.1.4"

src/librustc_expand/Cargo.toml

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

1313
[dependencies]
14-
rustc_serialize = { path = "../libserialize", package = "serialize" }
14+
rustc_serialize = { path = "../librustc_serialize" }
1515
log = "0.4"
1616
rustc_span = { path = "../librustc_span" }
1717
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "graphviz"
3+
name = "rustc_graphviz"
44
version = "0.0.0"
55
edition = "2018"
66

77
[lib]
8-
name = "graphviz"
8+
name = "rustc_graphviz"
99
path = "lib.rs"

src/libgraphviz/lib.rs 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>);
File renamed without changes.

src/librustc_hir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rustc_macros = { path = "../librustc_macros" }
1515
rustc_data_structures = { path = "../librustc_data_structures" }
1616
rustc_index = { path = "../librustc_index" }
1717
rustc_span = { path = "../librustc_span" }
18-
rustc_serialize = { path = "../libserialize", package = "serialize" }
18+
rustc_serialize = { path = "../librustc_serialize" }
1919
rustc_ast = { path = "../librustc_ast" }
2020
lazy_static = "1"
2121
log = { version = "0.4", features = ["release_max_level_info", "std"] }

src/librustc_incremental/Cargo.toml

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

1212
[dependencies]
13-
graphviz = { path = "../libgraphviz" }
13+
rustc_graphviz = { path = "../librustc_graphviz" }
1414
log = "0.4"
1515
rand = "0.7"
1616
rustc_middle = { path = "../librustc_middle" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }
1818
rustc_hir = { path = "../librustc_hir" }
19-
rustc_serialize = { path = "../libserialize", package = "serialize" }
19+
rustc_serialize = { path = "../librustc_serialize" }
2020
rustc_ast = { path = "../librustc_ast" }
2121
rustc_span = { path = "../librustc_span" }
2222
rustc_fs_util = { path = "../librustc_fs_util" }

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_index/Cargo.toml

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

1212
[dependencies]
13-
rustc_serialize = { path = "../libserialize", package = "serialize" }
13+
rustc_serialize = { path = "../librustc_serialize" }
1414
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

src/librustc_infer/Cargo.toml

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

1212
[dependencies]
13-
graphviz = { path = "../libgraphviz" }
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" }
@@ -19,7 +19,7 @@ rustc_hir = { path = "../librustc_hir" }
1919
rustc_index = { path = "../librustc_index" }
2020
rustc_macros = { path = "../librustc_macros" }
2121
rustc_session = { path = "../librustc_session" }
22-
rustc_serialize = { path = "../libserialize", package = "serialize" }
22+
rustc_serialize = { path = "../librustc_serialize" }
2323
rustc_span = { path = "../librustc_span" }
2424
rustc_target = { path = "../librustc_target" }
2525
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

src/librustc_interface/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rustc_expand = { path = "../librustc_expand" }
2121
rustc_parse = { path = "../librustc_parse" }
2222
rustc_session = { path = "../librustc_session" }
2323
rustc_span = { path = "../librustc_span" }
24-
rustc_serialize = { path = "../libserialize", package = "serialize" }
24+
rustc_serialize = { path = "../librustc_serialize" }
2525
rustc_middle = { path = "../librustc_middle" }
2626
rustc_ast_lowering = { path = "../librustc_ast_lowering" }
2727
rustc_ast_passes = { path = "../librustc_ast_passes" }

src/librustc_metadata/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rustc_hir = { path = "../librustc_hir" }
2323
rustc_hir_pretty = { path = "../librustc_hir_pretty" }
2424
rustc_target = { path = "../librustc_target" }
2525
rustc_index = { path = "../librustc_index" }
26-
rustc_serialize = { path = "../libserialize", package = "serialize" }
26+
rustc_serialize = { path = "../librustc_serialize" }
2727
stable_deref_trait = "1.0.0"
2828
rustc_ast = { path = "../librustc_ast" }
2929
rustc_expand = { path = "../librustc_expand" }

src/librustc_middle/Cargo.toml

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

1212
[dependencies]
13-
arena = { path = "../libarena" }
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"] }
@@ -26,7 +26,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
2626
rustc_query_system = { path = "../librustc_query_system" }
2727
rustc_errors = { path = "../librustc_errors" }
2828
rustc_index = { path = "../librustc_index" }
29-
rustc_serialize = { path = "../libserialize", package = "serialize" }
29+
rustc_serialize = { path = "../librustc_serialize" }
3030
rustc_ast = { path = "../librustc_ast" }
3131
rustc_span = { path = "../librustc_span" }
3232
byteorder = { version = "1.3" }

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

+2-2
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 = "../libgraphviz", package = "graphviz" }
14+
rustc_graphviz = { path = "../librustc_graphviz" }
1515
itertools = "0.8"
1616
log = "0.4"
1717
log_settings = "0.1.1"
@@ -25,7 +25,7 @@ rustc_index = { path = "../librustc_index" }
2525
rustc_infer = { path = "../librustc_infer" }
2626
rustc_lexer = { path = "../librustc_lexer" }
2727
rustc_macros = { path = "../librustc_macros" }
28-
rustc_serialize = { path = "../libserialize", package = "serialize" }
28+
rustc_serialize = { path = "../librustc_serialize" }
2929
rustc_session = { path = "../librustc_session" }
3030
rustc_target = { path = "../librustc_target" }
3131
rustc_trait_selection = { path = "../librustc_trait_selection" }

src/librustc_mir/borrow_check/region_infer/graphviz.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//! This module provides linkage between RegionInferenceContext and
2-
//! libgraphviz traits, specialized to attaching borrowck analysis
2+
//! librustc_graphviz traits, specialized to attaching borrowck analysis
33
//! data to rendered labels.
44
55
use std::borrow::Cow;
66
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

+2-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::*;
@@ -76,7 +77,7 @@ where
7677
/// Write a graphviz HTML-styled label for the given basic block, with
7778
/// all necessary escaping already performed. (This is suitable for
7879
/// emitting directly, as is done in this module, or for use with the
79-
/// LabelText::HtmlStr from libgraphviz.)
80+
/// LabelText::HtmlStr from librustc_graphviz.)
8081
///
8182
/// `init` and `fini` are callbacks for emitting additional rows of
8283
/// data (using HTML enclosed with `<tr>` in the emitted text).

src/librustc_mir_build/Cargo.toml

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

1212
[dependencies]
13-
arena = { path = "../libarena" }
13+
rustc_arena = { path = "../librustc_arena" }
1414
log = "0.4"
1515
rustc_middle = { path = "../librustc_middle" }
1616
rustc_apfloat = { path = "../librustc_apfloat" }
@@ -20,7 +20,7 @@ rustc_index = { path = "../librustc_index" }
2020
rustc_errors = { path = "../librustc_errors" }
2121
rustc_hir = { path = "../librustc_hir" }
2222
rustc_infer = { path = "../librustc_infer" }
23-
rustc_serialize = { path = "../libserialize", package = "serialize" }
23+
rustc_serialize = { path = "../librustc_serialize" }
2424
rustc_session = { path = "../librustc_session" }
2525
rustc_span = { path = "../librustc_span" }
2626
rustc_target = { path = "../librustc_target" }

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};

0 commit comments

Comments
 (0)