Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename all remaining compiler crates to use the rustc_foo pattern #72927

Merged
merged 4 commits into from
Jun 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 62 additions & 62 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/libarena/Cargo.toml → src/librustc_arena/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/librustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_ast_lowering/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ mod path;

const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;

rustc_hir::arena_types!(::arena::declare_arena, [], 'tcx);
rustc_hir::arena_types!(rustc_arena::declare_arena, [], 'tcx);

struct LoweringContext<'a, 'hir: 'a> {
crate_root: Option<Symbol>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_attr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_builtin_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_builtin_macros/asm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use fmt_macros as parse;

use rustc_ast::ast;
use rustc_ast::ptr::P;
use rustc_ast::token;
Expand All @@ -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};

Expand Down
3 changes: 1 addition & 2 deletions src/librustc_builtin_macros/format.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use ArgumentType::*;
use Position::*;

use fmt_macros as parse;

use rustc_ast::ast;
use rustc_ast::ptr::P;
use rustc_ast::token;
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};

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/obligation_forest/graphviz.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_expand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions src/libgraphviz/lib.rs → src/librustc_graphviz/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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>);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/librustc_hir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_incremental/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_incremental/assert_dep_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
4 changes: 2 additions & 2 deletions src/librustc_infer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_middle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_middle/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ macro_rules! arena_types {
)
}

arena_types!(arena::declare_arena, [], 'tcx);
arena_types!(rustc_arena::declare_arena, [], 'tcx);
4 changes: 2 additions & 2 deletions src/librustc_mir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_mir/borrow_check/region_infer/graphviz.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//! 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;
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.
Expand Down
1 change: 1 addition & 0 deletions src/librustc_mir/dataflow/framework/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/librustc_mir/dataflow/framework/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_mir/util/graphviz.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use rustc_graphviz as dot;
use rustc_hir::def_id::DefId;
use rustc_index::vec::Idx;
use rustc_middle::mir::*;
Expand Down Expand Up @@ -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 `<tr>` in the emitted text).
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir_build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_mir_build/hair/pattern/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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};
Expand Down
Loading