diff --git a/Cargo.lock b/Cargo.lock index e33d09bc21179..07c354a332416 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,14 +69,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" -[[package]] -name = "arena" -version = "0.0.0" -dependencies = [ - "rustc_data_structures", - "smallvec 1.4.0", -] - [[package]] name = "argon2rs" version = "0.2.5" @@ -1200,14 +1192,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "fmt_macros" -version = "0.0.0" -dependencies = [ - "rustc_lexer", - "rustc_span", -] - [[package]] name = "fnv" version = "1.0.6" @@ -1389,10 +1373,6 @@ dependencies = [ "regex", ] -[[package]] -name = "graphviz" -version = "0.0.0" - [[package]] name = "h2" version = "0.1.25" @@ -3599,6 +3579,14 @@ dependencies = [ "smallvec 1.4.0", ] +[[package]] +name = "rustc_arena" +version = "0.0.0" +dependencies = [ + "rustc_data_structures", + "smallvec 1.4.0", +] + [[package]] name = "rustc_ast" version = "0.0.0" @@ -3609,9 +3597,9 @@ dependencies = [ "rustc_index", "rustc_lexer", "rustc_macros", + "rustc_serialize", "rustc_span", "scoped-tls", - "serialize", "smallvec 1.4.0", ] @@ -3619,8 +3607,8 @@ dependencies = [ name = "rustc_ast_lowering" version = "0.0.0" dependencies = [ - "arena", "log", + "rustc_arena", "rustc_ast", "rustc_ast_pretty", "rustc_data_structures", @@ -3670,9 +3658,9 @@ dependencies = [ "rustc_errors", "rustc_feature", "rustc_macros", + "rustc_serialize", "rustc_session", "rustc_span", - "serialize", "version_check", ] @@ -3680,7 +3668,6 @@ dependencies = [ name = "rustc_builtin_macros" version = "0.0.0" dependencies = [ - "fmt_macros", "log", "rustc_ast", "rustc_ast_pretty", @@ -3690,6 +3677,7 @@ dependencies = [ "rustc_expand", "rustc_feature", "rustc_parse", + "rustc_parse_format", "rustc_session", "rustc_span", "rustc_target", @@ -3718,10 +3706,10 @@ dependencies = [ "rustc_index", "rustc_llvm", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", - "serialize", "smallvec 1.4.0", ] @@ -3746,11 +3734,11 @@ dependencies = [ "rustc_incremental", "rustc_index", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_symbol_mangling", "rustc_target", - "serialize", "tempfile", ] @@ -3762,7 +3750,6 @@ dependencies = [ "cfg-if", "crossbeam-utils 0.7.2", "ena 0.14.0", - "graphviz", "indexmap", "jobserver", "lazy_static", @@ -3774,8 +3761,9 @@ dependencies = [ "rustc-hash", "rustc-rayon", "rustc-rayon-core", + "rustc_graphviz", "rustc_index", - "serialize", + "rustc_serialize", "smallvec 1.4.0", "stable_deref_trait", "stacker", @@ -3807,10 +3795,10 @@ dependencies = [ "rustc_parse", "rustc_plugin_impl", "rustc_save_analysis", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", - "serialize", "winapi 0.3.8", ] @@ -3826,8 +3814,8 @@ dependencies = [ "atty", "log", "rustc_data_structures", + "rustc_serialize", "rustc_span", - "serialize", "termcolor", "termize", "unicode-width", @@ -3848,9 +3836,9 @@ dependencies = [ "rustc_feature", "rustc_lexer", "rustc_parse", + "rustc_serialize", "rustc_session", "rustc_span", - "serialize", "smallvec 1.4.0", ] @@ -3867,6 +3855,10 @@ dependencies = [ name = "rustc_fs_util" version = "0.0.0" +[[package]] +name = "rustc_graphviz" +version = "0.0.0" + [[package]] name = "rustc_hir" version = "0.0.0" @@ -3877,9 +3869,9 @@ dependencies = [ "rustc_data_structures", "rustc_index", "rustc_macros", + "rustc_serialize", "rustc_span", "rustc_target", - "serialize", "smallvec 1.4.0", ] @@ -3898,24 +3890,24 @@ dependencies = [ name = "rustc_incremental" version = "0.0.0" dependencies = [ - "graphviz", "log", "rand 0.7.3", "rustc_ast", "rustc_data_structures", "rustc_fs_util", + "rustc_graphviz", "rustc_hir", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", - "serialize", ] [[package]] name = "rustc_index" version = "0.0.0" dependencies = [ - "serialize", + "rustc_serialize", "smallvec 1.4.0", ] @@ -3923,19 +3915,19 @@ dependencies = [ name = "rustc_infer" version = "0.0.0" dependencies = [ - "graphviz", "log", "rustc_ast", "rustc_data_structures", "rustc_errors", + "rustc_graphviz", "rustc_hir", "rustc_index", "rustc_macros", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", - "serialize", "smallvec 1.4.0", ] @@ -3969,6 +3961,7 @@ dependencies = [ "rustc_plugin_impl", "rustc_privacy", "rustc_resolve", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_symbol_mangling", @@ -3977,7 +3970,6 @@ dependencies = [ "rustc_traits", "rustc_ty", "rustc_typeck", - "serialize", "smallvec 1.4.0", "tempfile", "winapi 0.3.8", @@ -4047,10 +4039,10 @@ dependencies = [ "rustc_hir_pretty", "rustc_index", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", - "serialize", "smallvec 1.4.0", "stable_deref_trait", "winapi 0.3.8", @@ -4060,7 +4052,6 @@ dependencies = [ name = "rustc_middle" version = "0.0.0" dependencies = [ - "arena", "bitflags", "byteorder", "chalk-ir", @@ -4069,6 +4060,7 @@ dependencies = [ "polonius-engine", "rustc-rayon-core", "rustc_apfloat", + "rustc_arena", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4078,11 +4070,11 @@ dependencies = [ "rustc_index", "rustc_macros", "rustc_query_system", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", "scoped-tls", - "serialize", "smallvec 1.4.0", ] @@ -4091,7 +4083,6 @@ name = "rustc_mir" version = "0.0.0" dependencies = [ "either", - "graphviz", "itertools 0.8.0", "log", "log_settings", @@ -4101,17 +4092,18 @@ dependencies = [ "rustc_attr", "rustc_data_structures", "rustc_errors", + "rustc_graphviz", "rustc_hir", "rustc_index", "rustc_infer", "rustc_lexer", "rustc_macros", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", "rustc_trait_selection", - "serialize", "smallvec 1.4.0", ] @@ -4119,9 +4111,9 @@ dependencies = [ name = "rustc_mir_build" version = "0.0.0" dependencies = [ - "arena", "log", "rustc_apfloat", + "rustc_arena", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4130,11 +4122,11 @@ dependencies = [ "rustc_index", "rustc_infer", "rustc_middle", + "rustc_serialize", "rustc_session", "rustc_span", "rustc_target", "rustc_trait_selection", - "serialize", "smallvec 1.4.0", ] @@ -4155,6 +4147,14 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "rustc_parse_format" +version = "0.0.0" +dependencies = [ + "rustc_lexer", + "rustc_span", +] + [[package]] name = "rustc_passes" version = "0.0.0" @@ -4206,15 +4206,15 @@ dependencies = [ name = "rustc_query_system" version = "0.0.0" dependencies = [ - "arena", "log", "parking_lot 0.10.2", "rustc-rayon-core", + "rustc_arena", "rustc_data_structures", "rustc_errors", "rustc_index", + "rustc_serialize", "rustc_span", - "serialize", "smallvec 1.4.0", ] @@ -4222,9 +4222,9 @@ dependencies = [ name = "rustc_resolve" version = "0.0.0" dependencies = [ - "arena", "bitflags", "log", + "rustc_arena", "rustc_ast", "rustc_ast_lowering", "rustc_ast_pretty", @@ -4260,6 +4260,14 @@ dependencies = [ "serde_json", ] +[[package]] +name = "rustc_serialize" +version = "0.0.0" +dependencies = [ + "indexmap", + "smallvec 1.4.0", +] + [[package]] name = "rustc_session" version = "0.0.0" @@ -4272,24 +4280,24 @@ dependencies = [ "rustc_errors", "rustc_feature", "rustc_fs_util", + "rustc_serialize", "rustc_span", "rustc_target", - "serialize", ] [[package]] name = "rustc_span" version = "0.0.0" dependencies = [ - "arena", "cfg-if", "log", "md-5", + "rustc_arena", "rustc_data_structures", "rustc_index", "rustc_macros", + "rustc_serialize", "scoped-tls", - "serialize", "sha-1", "unicode-width", ] @@ -4319,8 +4327,8 @@ dependencies = [ "rustc_data_structures", "rustc_index", "rustc_macros", + "rustc_serialize", "rustc_span", - "serialize", ] [[package]] @@ -4337,7 +4345,6 @@ checksum = "b725dadae9fabc488df69a287f5a99c5eaf5d10853842a8a3dfac52476f544ee" name = "rustc_trait_selection" version = "0.0.0" dependencies = [ - "fmt_macros", "log", "rustc_ast", "rustc_attr", @@ -4348,6 +4355,7 @@ dependencies = [ "rustc_infer", "rustc_macros", "rustc_middle", + "rustc_parse_format", "rustc_session", "rustc_span", "rustc_target", @@ -4393,8 +4401,8 @@ dependencies = [ name = "rustc_typeck" version = "0.0.0" dependencies = [ - "arena", "log", + "rustc_arena", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4657,14 +4665,6 @@ dependencies = [ "url 1.7.2", ] -[[package]] -name = "serialize" -version = "0.0.0" -dependencies = [ - "indexmap", - "smallvec 1.4.0", -] - [[package]] name = "sha-1" version = "0.8.2" diff --git a/src/libarena/Cargo.toml b/src/librustc_arena/Cargo.toml similarity index 86% rename from src/libarena/Cargo.toml rename to src/librustc_arena/Cargo.toml index 5158aab8b7dc5..dfae956e2b6d5 100644 --- a/src/libarena/Cargo.toml +++ b/src/librustc_arena/Cargo.toml @@ -1,11 +1,11 @@ [package] authors = ["The Rust Project Developers"] -name = "arena" +name = "rustc_arena" version = "0.0.0" edition = "2018" [lib] -name = "arena" +name = "rustc_arena" path = "lib.rs" [dependencies] diff --git a/src/libarena/lib.rs b/src/librustc_arena/lib.rs similarity index 100% rename from src/libarena/lib.rs rename to src/librustc_arena/lib.rs diff --git a/src/libarena/tests.rs b/src/librustc_arena/tests.rs similarity index 100% rename from src/libarena/tests.rs rename to src/librustc_arena/tests.rs diff --git a/src/librustc_ast/Cargo.toml b/src/librustc_ast/Cargo.toml index 7d105f9e8863d..6bd65fd5f96c7 100644 --- a/src/librustc_ast/Cargo.toml +++ b/src/librustc_ast/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } log = "0.4" scoped-tls = "1.0" rustc_span = { path = "../librustc_span" } diff --git a/src/librustc_ast_lowering/Cargo.toml b/src/librustc_ast_lowering/Cargo.toml index b477b75db5adc..d71eb4fcd5c27 100644 --- a/src/librustc_ast_lowering/Cargo.toml +++ b/src/librustc_ast_lowering/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -arena = { path = "../libarena" } +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" } diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index 3aab54ea90949..1f8c68f75e943 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -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, diff --git a/src/librustc_attr/Cargo.toml b/src/librustc_attr/Cargo.toml index d7af7fe6143e5..677796a8df0b3 100644 --- a/src/librustc_attr/Cargo.toml +++ b/src/librustc_attr/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] rustc_ast_pretty = { path = "../librustc_ast_pretty" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_errors = { path = "../librustc_errors" } rustc_span = { path = "../librustc_span" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_builtin_macros/Cargo.toml b/src/librustc_builtin_macros/Cargo.toml index c15438bde440e..fdb6c359052d0 100644 --- a/src/librustc_builtin_macros/Cargo.toml +++ b/src/librustc_builtin_macros/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -fmt_macros = { path = "../libfmt_macros" } +rustc_parse_format = { path = "../librustc_parse_format" } log = "0.4" rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } diff --git a/src/librustc_builtin_macros/asm.rs b/src/librustc_builtin_macros/asm.rs index fad638f6f2819..aabd5b5b5c31b 100644 --- a/src/librustc_builtin_macros/asm.rs +++ b/src/librustc_builtin_macros/asm.rs @@ -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}; diff --git a/src/librustc_builtin_macros/format.rs b/src/librustc_builtin_macros/format.rs index eed01b262bf0c..e574b076bf84c 100644 --- a/src/librustc_builtin_macros/format.rs +++ b/src/librustc_builtin_macros/format.rs @@ -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}; diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml index 64e66595d92d9..bedefcc30ed8c 100644 --- a/src/librustc_codegen_llvm/Cargo.toml +++ b/src/librustc_codegen_llvm/Cargo.toml @@ -29,7 +29,7 @@ rustc_incremental = { path = "../librustc_incremental" } rustc_index = { path = "../librustc_index" } rustc_llvm = { path = "../librustc_llvm" } rustc_session = { path = "../librustc_session" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_target = { path = "../librustc_target" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } rustc_ast = { path = "../librustc_ast" } diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml index e8bfc87aef5ea..eeb6b4aabcf29 100644 --- a/src/librustc_codegen_ssa/Cargo.toml +++ b/src/librustc_codegen_ssa/Cargo.toml @@ -19,7 +19,7 @@ libc = "0.2.50" jobserver = "0.1.11" tempfile = "3.1" -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } rustc_middle = { path = "../librustc_middle" } diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml index 67721220526ca..bf2ab0787cb70 100644 --- a/src/librustc_data_structures/Cargo.toml +++ b/src/librustc_data_structures/Cargo.toml @@ -16,8 +16,8 @@ log = "0.4" jobserver_crate = { version = "0.1.13", package = "jobserver" } lazy_static = "1" once_cell = { version = "1", features = ["parking_lot"] } -rustc_serialize = { path = "../libserialize", package = "serialize" } -graphviz = { path = "../libgraphviz" } +rustc_serialize = { path = "../librustc_serialize" } +rustc_graphviz = { path = "../librustc_graphviz" } cfg-if = "0.1.2" crossbeam-utils = { version = "0.7", features = ["nightly"] } stable_deref_trait = "1.0.0" diff --git a/src/librustc_data_structures/obligation_forest/graphviz.rs b/src/librustc_data_structures/obligation_forest/graphviz.rs index e1784f44fd112..3a268e4b4f432 100644 --- a/src/librustc_data_structures/obligation_forest/graphviz.rs +++ b/src/librustc_data_structures/obligation_forest/graphviz.rs @@ -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; diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index cfd103aed3240..75d6592076655 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -32,7 +32,7 @@ rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } rustc_session = { path = "../librustc_session" } rustc_error_codes = { path = "../librustc_error_codes" } rustc_interface = { path = "../librustc_interface" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } diff --git a/src/librustc_errors/Cargo.toml b/src/librustc_errors/Cargo.toml index b8340b1a1df6a..ed1f43e567da6 100644 --- a/src/librustc_errors/Cargo.toml +++ b/src/librustc_errors/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] log = "0.4" -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_span = { path = "../librustc_span" } rustc_data_structures = { path = "../librustc_data_structures" } unicode-width = "0.1.4" diff --git a/src/librustc_expand/Cargo.toml b/src/librustc_expand/Cargo.toml index 3cb79030771b8..ef617acfe1314 100644 --- a/src/librustc_expand/Cargo.toml +++ b/src/librustc_expand/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" doctest = false [dependencies] -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } log = "0.4" rustc_span = { path = "../librustc_span" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } diff --git a/src/libgraphviz/Cargo.toml b/src/librustc_graphviz/Cargo.toml similarity index 69% rename from src/libgraphviz/Cargo.toml rename to src/librustc_graphviz/Cargo.toml index 4a6e41f760319..9a5e78a560cf0 100644 --- a/src/libgraphviz/Cargo.toml +++ b/src/librustc_graphviz/Cargo.toml @@ -1,9 +1,9 @@ [package] authors = ["The Rust Project Developers"] -name = "graphviz" +name = "rustc_graphviz" version = "0.0.0" edition = "2018" [lib] -name = "graphviz" +name = "rustc_graphviz" path = "lib.rs" diff --git a/src/libgraphviz/lib.rs b/src/librustc_graphviz/lib.rs similarity index 99% rename from src/libgraphviz/lib.rs rename to src/librustc_graphviz/lib.rs index a53e0012ca221..4339092b63e85 100644 --- a/src/libgraphviz/lib.rs +++ b/src/librustc_graphviz/lib.rs @@ -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>); diff --git a/src/libgraphviz/tests.rs b/src/librustc_graphviz/tests.rs similarity index 100% rename from src/libgraphviz/tests.rs rename to src/librustc_graphviz/tests.rs diff --git a/src/librustc_hir/Cargo.toml b/src/librustc_hir/Cargo.toml index 811440fdeb987..1b91d769c7047 100644 --- a/src/librustc_hir/Cargo.toml +++ b/src/librustc_hir/Cargo.toml @@ -15,7 +15,7 @@ rustc_macros = { path = "../librustc_macros" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_index = { path = "../librustc_index" } rustc_span = { path = "../librustc_span" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } lazy_static = "1" log = { version = "0.4", features = ["release_max_level_info", "std"] } diff --git a/src/librustc_incremental/Cargo.toml b/src/librustc_incremental/Cargo.toml index 5caf1d411e637..7b3030fa1d9c1 100644 --- a/src/librustc_incremental/Cargo.toml +++ b/src/librustc_incremental/Cargo.toml @@ -10,13 +10,13 @@ path = "lib.rs" doctest = false [dependencies] -graphviz = { path = "../libgraphviz" } +rustc_graphviz = { path = "../librustc_graphviz" } log = "0.4" rand = "0.7" rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_hir = { path = "../librustc_hir" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } rustc_fs_util = { path = "../librustc_fs_util" } diff --git a/src/librustc_incremental/assert_dep_graph.rs b/src/librustc_incremental/assert_dep_graph.rs index 807ae586348e9..b1665d9e1aeb3 100644 --- a/src/librustc_incremental/assert_dep_graph.rs +++ b/src/librustc_incremental/assert_dep_graph.rs @@ -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}; diff --git a/src/librustc_index/Cargo.toml b/src/librustc_index/Cargo.toml index 1435297f27ada..f0422b1af1b97 100644 --- a/src/librustc_index/Cargo.toml +++ b/src/librustc_index/Cargo.toml @@ -10,5 +10,5 @@ path = "lib.rs" doctest = false [dependencies] -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } diff --git a/src/librustc_infer/Cargo.toml b/src/librustc_infer/Cargo.toml index fa8e5a2ab78b4..06fc7ecf95f26 100644 --- a/src/librustc_infer/Cargo.toml +++ b/src/librustc_infer/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -graphviz = { path = "../libgraphviz" } +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" } @@ -19,7 +19,7 @@ rustc_hir = { path = "../librustc_hir" } rustc_index = { path = "../librustc_index" } rustc_macros = { path = "../librustc_macros" } rustc_session = { path = "../librustc_session" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_span = { path = "../librustc_span" } rustc_target = { path = "../librustc_target" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 2963eb29bc170..112dc7037f588 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -21,7 +21,7 @@ rustc_expand = { path = "../librustc_expand" } rustc_parse = { path = "../librustc_parse" } rustc_session = { path = "../librustc_session" } rustc_span = { path = "../librustc_span" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_middle = { path = "../librustc_middle" } rustc_ast_lowering = { path = "../librustc_ast_lowering" } rustc_ast_passes = { path = "../librustc_ast_passes" } diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index b03e884cdaf7a..7bbe7567d2924 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -23,7 +23,7 @@ rustc_hir = { path = "../librustc_hir" } rustc_hir_pretty = { path = "../librustc_hir_pretty" } rustc_target = { path = "../librustc_target" } rustc_index = { path = "../librustc_index" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } stable_deref_trait = "1.0.0" rustc_ast = { path = "../librustc_ast" } rustc_expand = { path = "../librustc_expand" } diff --git a/src/librustc_middle/Cargo.toml b/src/librustc_middle/Cargo.toml index 0bb32438b7276..0c22672d5fb7d 100644 --- a/src/librustc_middle/Cargo.toml +++ b/src/librustc_middle/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -arena = { path = "../libarena" } +rustc_arena = { path = "../librustc_arena" } bitflags = "1.2.1" scoped-tls = "1.0" log = { version = "0.4", features = ["release_max_level_info", "std"] } @@ -26,7 +26,7 @@ rustc_data_structures = { path = "../librustc_data_structures" } rustc_query_system = { path = "../librustc_query_system" } rustc_errors = { path = "../librustc_errors" } rustc_index = { path = "../librustc_index" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } byteorder = { version = "1.3" } diff --git a/src/librustc_middle/arena.rs b/src/librustc_middle/arena.rs index d5212ec5c3081..75228350c6c45 100644 --- a/src/librustc_middle/arena.rs +++ b/src/librustc_middle/arena.rs @@ -88,4 +88,4 @@ macro_rules! arena_types { ) } -arena_types!(arena::declare_arena, [], 'tcx); +arena_types!(rustc_arena::declare_arena, [], 'tcx); diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml index d922a83232901..aebce78e4018b 100644 --- a/src/librustc_mir/Cargo.toml +++ b/src/librustc_mir/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] either = "1.5.0" -dot = { path = "../libgraphviz", package = "graphviz" } +rustc_graphviz = { path = "../librustc_graphviz" } itertools = "0.8" log = "0.4" log_settings = "0.1.1" @@ -25,7 +25,7 @@ rustc_index = { path = "../librustc_index" } rustc_infer = { path = "../librustc_infer" } rustc_lexer = { path = "../librustc_lexer" } rustc_macros = { path = "../librustc_macros" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_session = { path = "../librustc_session" } rustc_target = { path = "../librustc_target" } rustc_trait_selection = { path = "../librustc_trait_selection" } diff --git a/src/librustc_mir/borrow_check/region_infer/graphviz.rs b/src/librustc_mir/borrow_check/region_infer/graphviz.rs index 39b396ba4e7d3..a272e922a504e 100644 --- a/src/librustc_mir/borrow_check/region_infer/graphviz.rs +++ b/src/librustc_mir/borrow_check/region_infer/graphviz.rs @@ -1,5 +1,5 @@ //! This module provides linkage between RegionInferenceContext and -//! libgraphviz traits, specialized to attaching borrowck analysis +//! librustc_graphviz traits, specialized to attaching borrowck analysis //! data to rendered labels. use std::borrow::Cow; @@ -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. diff --git a/src/librustc_mir/dataflow/framework/engine.rs b/src/librustc_mir/dataflow/framework/engine.rs index 32e569fdc3589..243b3679f2984 100644 --- a/src/librustc_mir/dataflow/framework/engine.rs +++ b/src/librustc_mir/dataflow/framework/engine.rs @@ -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; diff --git a/src/librustc_mir/dataflow/framework/graphviz.rs b/src/librustc_mir/dataflow/framework/graphviz.rs index e3ba26eaf8b37..896616a2175ac 100644 --- a/src/librustc_mir/dataflow/framework/graphviz.rs +++ b/src/librustc_mir/dataflow/framework/graphviz.rs @@ -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}; diff --git a/src/librustc_mir/util/graphviz.rs b/src/librustc_mir/util/graphviz.rs index fb862b926d782..a0a82ce3b9df9 100644 --- a/src/librustc_mir/util/graphviz.rs +++ b/src/librustc_mir/util/graphviz.rs @@ -1,3 +1,4 @@ +use rustc_graphviz as dot; use rustc_hir::def_id::DefId; use rustc_index::vec::Idx; use rustc_middle::mir::*; @@ -76,7 +77,7 @@ where /// Write a graphviz HTML-styled label for the given basic block, with /// all necessary escaping already performed. (This is suitable for /// emitting directly, as is done in this module, or for use with the -/// LabelText::HtmlStr from libgraphviz.) +/// LabelText::HtmlStr from librustc_graphviz.) /// /// `init` and `fini` are callbacks for emitting additional rows of /// data (using HTML enclosed with `` in the emitted text). diff --git a/src/librustc_mir_build/Cargo.toml b/src/librustc_mir_build/Cargo.toml index 4a64cf74787ac..401a5009e3cf7 100644 --- a/src/librustc_mir_build/Cargo.toml +++ b/src/librustc_mir_build/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -arena = { path = "../libarena" } +rustc_arena = { path = "../librustc_arena" } log = "0.4" rustc_middle = { path = "../librustc_middle" } rustc_apfloat = { path = "../librustc_apfloat" } @@ -20,7 +20,7 @@ rustc_index = { path = "../librustc_index" } rustc_errors = { path = "../librustc_errors" } rustc_hir = { path = "../librustc_hir" } rustc_infer = { path = "../librustc_infer" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_session = { path = "../librustc_session" } rustc_span = { path = "../librustc_span" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_mir_build/hair/pattern/_match.rs b/src/librustc_mir_build/hair/pattern/_match.rs index 575ddcef99715..2de6d9fe3d480 100644 --- a/src/librustc_mir_build/hair/pattern/_match.rs +++ b/src/librustc_mir_build/hair/pattern/_match.rs @@ -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}; diff --git a/src/librustc_mir_build/hair/pattern/check_match.rs b/src/librustc_mir_build/hair/pattern/check_match.rs index 707502640e05c..4d97a19f4086b 100644 --- a/src/librustc_mir_build/hair/pattern/check_match.rs +++ b/src/librustc_mir_build/hair/pattern/check_match.rs @@ -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; diff --git a/src/libfmt_macros/Cargo.toml b/src/librustc_parse_format/Cargo.toml similarity index 79% rename from src/libfmt_macros/Cargo.toml rename to src/librustc_parse_format/Cargo.toml index 01608701a79dc..646509569f3a5 100644 --- a/src/libfmt_macros/Cargo.toml +++ b/src/librustc_parse_format/Cargo.toml @@ -1,11 +1,11 @@ [package] authors = ["The Rust Project Developers"] -name = "fmt_macros" +name = "rustc_parse_format" version = "0.0.0" edition = "2018" [lib] -name = "fmt_macros" +name = "rustc_parse_format" path = "lib.rs" [dependencies] diff --git a/src/libfmt_macros/lib.rs b/src/librustc_parse_format/lib.rs similarity index 100% rename from src/libfmt_macros/lib.rs rename to src/librustc_parse_format/lib.rs diff --git a/src/libfmt_macros/tests.rs b/src/librustc_parse_format/tests.rs similarity index 100% rename from src/libfmt_macros/tests.rs rename to src/librustc_parse_format/tests.rs diff --git a/src/librustc_query_system/Cargo.toml b/src/librustc_query_system/Cargo.toml index 392e19e1f4471..73d50f84fe836 100644 --- a/src/librustc_query_system/Cargo.toml +++ b/src/librustc_query_system/Cargo.toml @@ -10,13 +10,13 @@ path = "lib.rs" doctest = false [dependencies] -arena = { path = "../libarena" } +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" } rustc_errors = { path = "../librustc_errors" } rustc_index = { path = "../librustc_index" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_span = { path = "../librustc_span" } parking_lot = "0.10" smallvec = { version = "1.0", features = ["union", "may_dangle"] } diff --git a/src/librustc_query_system/query/caches.rs b/src/librustc_query_system/query/caches.rs index 6a47abc5b4612..f0beec0a17726 100644 --- a/src/librustc_query_system/query/caches.rs +++ b/src/librustc_query_system/query/caches.rs @@ -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; diff --git a/src/librustc_resolve/Cargo.toml b/src/librustc_resolve/Cargo.toml index 420a82d6d2ced..fa5c557b5d9c6 100644 --- a/src/librustc_resolve/Cargo.toml +++ b/src/librustc_resolve/Cargo.toml @@ -14,7 +14,7 @@ doctest = false bitflags = "1.2.1" log = "0.4" rustc_ast = { path = "../librustc_ast" } -arena = { path = "../libarena" } +rustc_arena = { path = "../librustc_arena" } rustc_middle = { path = "../librustc_middle" } rustc_ast_lowering = { path = "../librustc_ast_lowering" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index c7f10fac6bc08..00a5d08d6a955 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -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>, + modules: TypedArena>, local_modules: RefCell>>, - name_bindings: arena::TypedArena>, - imports: arena::TypedArena>, - name_resolutions: arena::TypedArena>>, - macro_rules_bindings: arena::TypedArena>, - ast_paths: arena::TypedArena, + name_bindings: TypedArena>, + imports: TypedArena>, + name_resolutions: TypedArena>>, + macro_rules_bindings: TypedArena>, + ast_paths: TypedArena, } impl<'a> ResolverArenas<'a> { diff --git a/src/libserialize/Cargo.toml b/src/librustc_serialize/Cargo.toml similarity index 80% rename from src/libserialize/Cargo.toml rename to src/librustc_serialize/Cargo.toml index 96a0d51bc716d..84206df50ccee 100644 --- a/src/libserialize/Cargo.toml +++ b/src/librustc_serialize/Cargo.toml @@ -1,11 +1,11 @@ [package] authors = ["The Rust Project Developers"] -name = "serialize" +name = "rustc_serialize" version = "0.0.0" edition = "2018" [lib] -name = "serialize" +name = "rustc_serialize" path = "lib.rs" [dependencies] diff --git a/src/libserialize/collection_impls.rs b/src/librustc_serialize/collection_impls.rs similarity index 100% rename from src/libserialize/collection_impls.rs rename to src/librustc_serialize/collection_impls.rs diff --git a/src/libserialize/json.rs b/src/librustc_serialize/json.rs similarity index 99% rename from src/libserialize/json.rs rename to src/librustc_serialize/json.rs index 2d4e953ac5165..820ebdc9baa52 100644 --- a/src/libserialize/json.rs +++ b/src/librustc_serialize/json.rs @@ -68,7 +68,6 @@ //! //! ```rust //! # #![feature(rustc_private)] -//! extern crate serialize as rustc_serialize; // for the deriving below //! use rustc_serialize::json; //! //! // Automatically generate `Decodable` and `Encodable` trait implementations @@ -103,7 +102,6 @@ //! //! ```rust //! # #![feature(rustc_private)] -//! extern crate serialize as rustc_serialize; //! use rustc_serialize::json::{self, ToJson, Json}; //! //! // A custom data structure @@ -143,7 +141,6 @@ //! //! ```rust //! # #![feature(rustc_private)] -//! extern crate serialize as rustc_serialize; //! use std::collections::BTreeMap; //! use rustc_serialize::json::{self, Json, ToJson}; //! diff --git a/src/libserialize/json/tests.rs b/src/librustc_serialize/json/tests.rs similarity index 100% rename from src/libserialize/json/tests.rs rename to src/librustc_serialize/json/tests.rs diff --git a/src/libserialize/leb128.rs b/src/librustc_serialize/leb128.rs similarity index 100% rename from src/libserialize/leb128.rs rename to src/librustc_serialize/leb128.rs diff --git a/src/libserialize/lib.rs b/src/librustc_serialize/lib.rs similarity index 100% rename from src/libserialize/lib.rs rename to src/librustc_serialize/lib.rs diff --git a/src/libserialize/opaque.rs b/src/librustc_serialize/opaque.rs similarity index 100% rename from src/libserialize/opaque.rs rename to src/librustc_serialize/opaque.rs diff --git a/src/libserialize/serialize.rs b/src/librustc_serialize/serialize.rs similarity index 100% rename from src/libserialize/serialize.rs rename to src/librustc_serialize/serialize.rs diff --git a/src/libserialize/tests/json.rs b/src/librustc_serialize/tests/json.rs similarity index 99% rename from src/libserialize/tests/json.rs rename to src/librustc_serialize/tests/json.rs index 688bddc2baf46..59c481edbca3a 100644 --- a/src/libserialize/tests/json.rs +++ b/src/librustc_serialize/tests/json.rs @@ -1,7 +1,5 @@ #![allow(rustc::internal)] -extern crate serialize as rustc_serialize; - use json::DecoderError::*; use json::ErrorCode::*; use json::Json::*; diff --git a/src/libserialize/tests/leb128.rs b/src/librustc_serialize/tests/leb128.rs similarity index 97% rename from src/libserialize/tests/leb128.rs rename to src/librustc_serialize/tests/leb128.rs index bf5afb409f861..b0f7e785b7877 100644 --- a/src/libserialize/tests/leb128.rs +++ b/src/librustc_serialize/tests/leb128.rs @@ -1,4 +1,3 @@ -extern crate serialize as rustc_serialize; use rustc_serialize::leb128::*; macro_rules! impl_test_unsigned_leb128 { diff --git a/src/libserialize/tests/opaque.rs b/src/librustc_serialize/tests/opaque.rs similarity index 99% rename from src/libserialize/tests/opaque.rs rename to src/librustc_serialize/tests/opaque.rs index a6ec1580aca36..c827391700709 100644 --- a/src/libserialize/tests/opaque.rs +++ b/src/librustc_serialize/tests/opaque.rs @@ -1,7 +1,5 @@ #![allow(rustc::internal)] -extern crate serialize as rustc_serialize; - use rustc_serialize::opaque::{Decoder, Encoder}; use rustc_serialize::{Decodable, Encodable}; use std::fmt::Debug; diff --git a/src/librustc_session/Cargo.toml b/src/librustc_session/Cargo.toml index 705c115cf3c85..4d57c6384ddbd 100644 --- a/src/librustc_session/Cargo.toml +++ b/src/librustc_session/Cargo.toml @@ -14,7 +14,7 @@ log = "0.4" rustc_errors = { path = "../librustc_errors" } rustc_feature = { path = "../librustc_feature" } rustc_target = { path = "../librustc_target" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_span = { path = "../librustc_span" } rustc_fs_util = { path = "../librustc_fs_util" } diff --git a/src/librustc_span/Cargo.toml b/src/librustc_span/Cargo.toml index 1c2721260d69b..2a7a774872525 100644 --- a/src/librustc_span/Cargo.toml +++ b/src/librustc_span/Cargo.toml @@ -10,11 +10,11 @@ path = "lib.rs" doctest = false [dependencies] -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_macros = { path = "../librustc_macros" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_index = { path = "../librustc_index" } -arena = { path = "../libarena" } +rustc_arena = { path = "../librustc_arena" } scoped-tls = "1.0" unicode-width = "0.1.4" cfg-if = "0.1.2" diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs index 0f2d52c2264fd..d165409696eca 100644 --- a/src/librustc_span/symbol.rs +++ b/src/librustc_span/symbol.rs @@ -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}; diff --git a/src/librustc_target/Cargo.toml b/src/librustc_target/Cargo.toml index 0e234036879e5..c73490e451320 100644 --- a/src/librustc_target/Cargo.toml +++ b/src/librustc_target/Cargo.toml @@ -13,6 +13,6 @@ bitflags = "1.2.1" log = "0.4" rustc_data_structures = { path = "../librustc_data_structures" } rustc_macros = { path = "../librustc_macros" } -rustc_serialize = { path = "../libserialize", package = "serialize" } +rustc_serialize = { path = "../librustc_serialize" } rustc_span = { path = "../librustc_span" } rustc_index = { path = "../librustc_index" } diff --git a/src/librustc_trait_selection/Cargo.toml b/src/librustc_trait_selection/Cargo.toml index 254695e53e04d..fd11a85a9c406 100644 --- a/src/librustc_trait_selection/Cargo.toml +++ b/src/librustc_trait_selection/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -fmt_macros = { path = "../libfmt_macros" } +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" } diff --git a/src/librustc_trait_selection/traits/on_unimplemented.rs b/src/librustc_trait_selection/traits/on_unimplemented.rs index 7e66e08f7e6a6..a1dfa838e7af3 100644 --- a/src/librustc_trait_selection/traits/on_unimplemented.rs +++ b/src/librustc_trait_selection/traits/on_unimplemented.rs @@ -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; diff --git a/src/librustc_typeck/Cargo.toml b/src/librustc_typeck/Cargo.toml index 8aaa29bc582fc..9329069c48dd1 100644 --- a/src/librustc_typeck/Cargo.toml +++ b/src/librustc_typeck/Cargo.toml @@ -11,7 +11,7 @@ test = false doctest = false [dependencies] -arena = { path = "../libarena" } +rustc_arena = { path = "../librustc_arena" } log = "0.4" rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } diff --git a/src/librustc_typeck/variance/mod.rs b/src/librustc_typeck/variance/mod.rs index 631f551ade4fe..23f4e1f5346e5 100644 --- a/src/librustc_typeck/variance/mod.rs +++ b/src/librustc_typeck/variance/mod.rs @@ -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) diff --git a/src/librustc_typeck/variance/terms.rs b/src/librustc_typeck/variance/terms.rs index fe585826d2205..6e15485756d98 100644 --- a/src/librustc_typeck/variance/terms.rs +++ b/src/librustc_typeck/variance/terms.rs @@ -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; diff --git a/src/test/run-make-fulldeps/pretty-expanded/input.rs b/src/test/run-make-fulldeps/pretty-expanded/input.rs index 3cbabc5b46061..af3d75b3bf216 100644 --- a/src/test/run-make-fulldeps/pretty-expanded/input.rs +++ b/src/test/run-make-fulldeps/pretty-expanded/input.rs @@ -2,7 +2,7 @@ // #13544 -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; #[derive(RustcEncodable)] pub struct A; #[derive(RustcEncodable)] pub struct B(isize); diff --git a/src/test/run-make-fulldeps/save-analysis-fail/foo.rs b/src/test/run-make-fulldeps/save-analysis-fail/foo.rs index e042210ac79b0..5d504ced65e33 100644 --- a/src/test/run-make-fulldeps/save-analysis-fail/foo.rs +++ b/src/test/run-make-fulldeps/save-analysis-fail/foo.rs @@ -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; diff --git a/src/test/run-make-fulldeps/save-analysis/foo.rs b/src/test/run-make-fulldeps/save-analysis/foo.rs index bc0209dc5832a..789ab686e3f8e 100644 --- a/src/test/run-make-fulldeps/save-analysis/foo.rs +++ b/src/test/run-make-fulldeps/save-analysis/foo.rs @@ -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; @@ -27,7 +27,7 @@ use std::char::from_u32; static uni: &'static str = "Les Miséééééééérables"; static yy: usize = 25; -static bob: Option = None; +static bob: Option = None; // buglink test - see issue #1337. @@ -418,7 +418,7 @@ impl Error + 'static + Send { ::is::(self) } } -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; #[derive(Clone, Copy, Hash, RustcEncodable, RustcDecodable, PartialEq, Eq, PartialOrd, Ord, Debug, Default)] struct AllDerives(i32); diff --git a/src/test/ui-fulldeps/derive-no-std-not-supported.rs b/src/test/ui-fulldeps/derive-no-std-not-supported.rs index d09b1922a7ba5..1299d82d9c4b9 100644 --- a/src/test/ui-fulldeps/derive-no-std-not-supported.rs +++ b/src/test/ui-fulldeps/derive-no-std-not-supported.rs @@ -4,7 +4,7 @@ #![feature(rustc_private)] #![no_std] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; #[derive(RustcEncodable)] struct Bar { diff --git a/src/test/ui-fulldeps/deriving-encodable-decodable-box.rs b/src/test/ui-fulldeps/deriving-encodable-decodable-box.rs index 29c1b8fb0da97..2b349ae9556c3 100644 --- a/src/test/ui-fulldeps/deriving-encodable-decodable-box.rs +++ b/src/test/ui-fulldeps/deriving-encodable-decodable-box.rs @@ -5,7 +5,7 @@ #![feature(box_syntax)] #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; use rustc_serialize::{Encodable, Decodable}; use rustc_serialize::json; diff --git a/src/test/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs b/src/test/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs index fe608890bbd4d..c2aecbdc16793 100644 --- a/src/test/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs +++ b/src/test/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs @@ -7,7 +7,7 @@ #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; use std::cell::{Cell, RefCell}; use rustc_serialize::{Encodable, Decodable}; diff --git a/src/test/ui-fulldeps/deriving-global.rs b/src/test/ui-fulldeps/deriving-global.rs index d7cc98fed2595..5ba34a7af6bf5 100644 --- a/src/test/ui-fulldeps/deriving-global.rs +++ b/src/test/ui-fulldeps/deriving-global.rs @@ -2,7 +2,7 @@ #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; mod submod { // if any of these are implemented without global calls for any diff --git a/src/test/ui-fulldeps/deriving-hygiene.rs b/src/test/ui-fulldeps/deriving-hygiene.rs index b1bdfaceb887d..85ef217e7671e 100644 --- a/src/test/ui-fulldeps/deriving-hygiene.rs +++ b/src/test/ui-fulldeps/deriving-hygiene.rs @@ -2,7 +2,7 @@ #![allow(non_upper_case_globals)] #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; pub const other: u8 = 1; pub const f: u8 = 1; diff --git a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.rs b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.rs index a7e8131342f55..fabcd727482dc 100644 --- a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.rs +++ b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.rs @@ -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; diff --git a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr index 7009c0bba6981..98c1a22bd1de0 100644 --- a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr @@ -7,7 +7,7 @@ LL | } | - | | | `arena` dropped here while still borrowed - | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `arena::TypedArena` + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `rustc_arena::TypedArena` error: aborting due to previous error diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs index e454f44d1af6b..86485a9887fbe 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs @@ -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; } diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr index 319848b989634..22c7487e8f516 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr @@ -7,7 +7,7 @@ LL | } | - | | | `arena` dropped here while still borrowed - | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `arena::TypedArena` + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `rustc_arena::TypedArena` error: aborting due to previous error diff --git a/src/test/ui-fulldeps/dropck_tarena_sound_drop.rs b/src/test/ui-fulldeps/dropck_tarena_sound_drop.rs index cf188d9efa3b2..c5b9efee8e730 100644 --- a/src/test/ui-fulldeps/dropck_tarena_sound_drop.rs +++ b/src/test/ui-fulldeps/dropck_tarena_sound_drop.rs @@ -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; } diff --git a/src/test/ui-fulldeps/empty-struct-braces-derive.rs b/src/test/ui-fulldeps/empty-struct-braces-derive.rs index 68b407423aa68..fc85765eea4a5 100644 --- a/src/test/ui-fulldeps/empty-struct-braces-derive.rs +++ b/src/test/ui-fulldeps/empty-struct-braces-derive.rs @@ -3,7 +3,7 @@ #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, RustcEncodable, RustcDecodable)] diff --git a/src/test/ui-fulldeps/extern-mod-syntax.rs b/src/test/ui-fulldeps/extern-mod-syntax.rs index 258ab0dbe9562..a90ab7ac4388e 100644 --- a/src/test/ui-fulldeps/extern-mod-syntax.rs +++ b/src/test/ui-fulldeps/extern-mod-syntax.rs @@ -3,8 +3,8 @@ #![allow(unused_imports)] #![feature(rustc_private)] -extern crate serialize; -use serialize::json::Object; +extern crate rustc_serialize; +use rustc_serialize::json::Object; pub fn main() { println!("Hello world!"); diff --git a/src/test/ui-fulldeps/issue-11881.rs b/src/test/ui-fulldeps/issue-11881.rs index bd046a6cdee5f..7b0abba4d16c8 100644 --- a/src/test/ui-fulldeps/issue-11881.rs +++ b/src/test/ui-fulldeps/issue-11881.rs @@ -6,7 +6,7 @@ #![feature(rustc_private)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; use std::io::Cursor; use std::io::prelude::*; diff --git a/src/test/ui-fulldeps/issue-14021.rs b/src/test/ui-fulldeps/issue-14021.rs index 49fa4492fa1ee..1898b12c70385 100644 --- a/src/test/ui-fulldeps/issue-14021.rs +++ b/src/test/ui-fulldeps/issue-14021.rs @@ -4,11 +4,10 @@ #![allow(unused_imports)] #![feature(rustc_private)] -extern crate serialize; -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; -use serialize::{Encodable, Decodable}; -use serialize::json; +use rustc_serialize::{Encodable, Decodable}; +use rustc_serialize::json; #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)] struct UnitLikeStruct; diff --git a/src/test/ui-fulldeps/issue-15924.rs b/src/test/ui-fulldeps/issue-15924.rs index ec33de12ebbee..e3d4b0eb4460d 100644 --- a/src/test/ui-fulldeps/issue-15924.rs +++ b/src/test/ui-fulldeps/issue-15924.rs @@ -6,11 +6,11 @@ #![feature(rustc_private)] -extern crate serialize; +extern crate rustc_serialize; use std::fmt; -use serialize::{Encoder, Encodable}; -use serialize::json; +use rustc_serialize::{Encoder, Encodable}; +use rustc_serialize::json; struct Foo { v: T, diff --git a/src/test/ui-fulldeps/issue-24972.rs b/src/test/ui-fulldeps/issue-24972.rs index 0d354aac13787..51e134fbf8871 100644 --- a/src/test/ui-fulldeps/issue-24972.rs +++ b/src/test/ui-fulldeps/issue-24972.rs @@ -3,9 +3,9 @@ #![allow(dead_code)] #![feature(rustc_private)] -extern crate serialize; +extern crate rustc_serialize; -use serialize::{Encodable, Decodable}; +use rustc_serialize::{Encodable, Decodable}; use std::fmt::Display; pub trait Entity : Decodable + Encodable + Sized { diff --git a/src/test/ui-fulldeps/issue-2804.rs b/src/test/ui-fulldeps/issue-2804.rs index a5345bbcd1465..3d5922d155f26 100644 --- a/src/test/ui-fulldeps/issue-2804.rs +++ b/src/test/ui-fulldeps/issue-2804.rs @@ -4,10 +4,10 @@ #![allow(dead_code)] #![feature(rustc_private)] -extern crate serialize; +extern crate rustc_serialize; use std::collections::HashMap; -use serialize::json::{self, Json}; +use rustc_serialize::json::{self, Json}; use std::option; enum object { diff --git a/src/test/ui-fulldeps/issue-4016.rs b/src/test/ui-fulldeps/issue-4016.rs index fb84acbe64525..96157c2f426c0 100644 --- a/src/test/ui-fulldeps/issue-4016.rs +++ b/src/test/ui-fulldeps/issue-4016.rs @@ -4,9 +4,9 @@ #![feature(rustc_private)] -extern crate serialize; +extern crate rustc_serialize; -use serialize::{json, Decodable}; +use rustc_serialize::{json, Decodable}; trait JD : Decodable {} diff --git a/src/test/ui-fulldeps/issue-4036.rs b/src/test/ui-fulldeps/issue-4036.rs index 9c9d39142681a..05a7a30140a44 100644 --- a/src/test/ui-fulldeps/issue-4036.rs +++ b/src/test/ui-fulldeps/issue-4036.rs @@ -6,9 +6,9 @@ #![feature(rustc_private)] -extern crate serialize; +extern crate rustc_serialize; -use serialize::{json, Decodable}; +use rustc_serialize::{json, Decodable}; pub fn main() { let json = json::from_str("[1]").unwrap(); diff --git a/src/test/ui-fulldeps/regions-mock-tcx.rs b/src/test/ui-fulldeps/regions-mock-tcx.rs index 524c94a8555ec..30e6272324068 100644 --- a/src/test/ui-fulldeps/regions-mock-tcx.rs +++ b/src/test/ui-fulldeps/regions-mock-tcx.rs @@ -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; diff --git a/src/test/ui-fulldeps/rustc_encodable_hygiene.rs b/src/test/ui-fulldeps/rustc_encodable_hygiene.rs index 42a6153465c29..b49135cb60b29 100644 --- a/src/test/ui-fulldeps/rustc_encodable_hygiene.rs +++ b/src/test/ui-fulldeps/rustc_encodable_hygiene.rs @@ -4,7 +4,7 @@ #[allow(dead_code)] -extern crate serialize as rustc_serialize; +extern crate rustc_serialize; #[derive(RustcDecodable, RustcEncodable,Debug)] struct A { diff --git a/src/tools/clippy/clippy_lints/src/lib.rs b/src/tools/clippy/clippy_lints/src/lib.rs index 902f3d56c1e4f..b7d928d249f96 100644 --- a/src/tools/clippy/clippy_lints/src/lib.rs +++ b/src/tools/clippy/clippy_lints/src/lib.rs @@ -16,8 +16,6 @@ // FIXME: switch to something more ergonomic here, once available. // (Currently there is no way to opt into sysroot crates without `extern crate`.) #[allow(unused_extern_crates)] -extern crate fmt_macros; -#[allow(unused_extern_crates)] extern crate rustc_ast; #[allow(unused_extern_crates)] extern crate rustc_ast_pretty; @@ -48,6 +46,8 @@ extern crate rustc_mir; #[allow(unused_extern_crates)] extern crate rustc_parse; #[allow(unused_extern_crates)] +extern crate rustc_parse_format; +#[allow(unused_extern_crates)] extern crate rustc_session; #[allow(unused_extern_crates)] extern crate rustc_span; diff --git a/src/tools/clippy/clippy_lints/src/write.rs b/src/tools/clippy/clippy_lints/src/write.rs index 37fbc2bad468f..cb769b5a2ce95 100644 --- a/src/tools/clippy/clippy_lints/src/write.rs +++ b/src/tools/clippy/clippy_lints/src/write.rs @@ -352,7 +352,7 @@ impl Write { tts: &TokenStream, is_write: bool, ) -> (Option, Option) { - use fmt_macros::{ + use rustc_parse_format::{ AlignUnknown, ArgumentImplicitlyIs, ArgumentIs, ArgumentNamed, CountImplied, FormatSpec, ParseMode, Parser, Piece, };