Skip to content

Commit d5a91e6

Browse files
committed
Auto merge of #32432 - eddyb:dock-service, r=nikomatsakis
Flatten rustc and rustc_trans module hierarchy slightly. The following moves were made, in the name of sanity/simplicity: * `rustc::middle::{cfg, infer, traits, ty}` to `rustc::{cfg, infer, traits, ty}` * `rustc::middle::subst` to `rustc::ty::subst` * `rustc_trans::trans::*` to `rustc_trans::*` * `rustc_trans::save` to `rustc_save_analysis` (cc @nrc) I've rebased a larger WIP branch on top of this and the only conflicts were in imports, but YMMV.
2 parents 97ec69f + 035a645 commit d5a91e6

File tree

255 files changed

+1204
-1192
lines changed

Some content is hidden

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

255 files changed

+1204
-1192
lines changed

mk/crates.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ TARGET_CRATES := libc std term \
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
60-
rustc_plugin rustc_metadata rustc_passes
60+
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis
6161
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6262
flate arena graphviz rbml log serialize
6363
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -102,7 +102,7 @@ DEPS_rustc_data_structures := std log serialize
102102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
103103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
104104
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
105-
rustc_metadata syntax_ext rustc_passes
105+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
106106
DEPS_rustc_front := std syntax log serialize
107107
DEPS_rustc_lint := rustc log syntax
108108
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
@@ -116,6 +116,7 @@ DEPS_rustc_privacy := rustc rustc_front log syntax
116116
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
117117
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
118118
rustc_const_eval
119+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
119120
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
120121

121122
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \

src/librustc/middle/cfg/construct.rs renamed to src/librustc/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
// except according to those terms.
1010

1111
use rustc_data_structures::graph;
12-
use middle::cfg::*;
12+
use cfg::*;
1313
use middle::def::Def;
1414
use middle::pat_util;
15-
use middle::ty::{self, TyCtxt};
15+
use ty::{self, TyCtxt};
1616
use syntax::ast;
1717
use syntax::ptr::P;
1818

src/librustc/middle/cfg/graphviz.rs renamed to src/librustc/cfg/graphviz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use graphviz::IntoCow;
1818
use syntax::ast;
1919

2020
use front::map as ast_map;
21-
use middle::cfg;
21+
use cfg;
2222

2323
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
2424
pub type Edge<'a> = &'a cfg::CFGEdge;

src/librustc/middle/cfg/mod.rs renamed to src/librustc/cfg/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! Uses `Graph` as the underlying representation.
1313
1414
use rustc_data_structures::graph;
15-
use middle::ty::TyCtxt;
15+
use ty::TyCtxt;
1616
use syntax::ast;
1717
use rustc_front::hir;
1818

src/librustc/dep_graph/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use self::thread::{DepGraphThreadData, DepMessage};
1212
use middle::def_id::DefId;
1313
use syntax::ast::NodeId;
14-
use middle::ty::TyCtxt;
14+
use ty::TyCtxt;
1515
use rustc_front::hir;
1616
use rustc_front::intravisit::Visitor;
1717
use std::rc::Rc;
File renamed without changes.

src/librustc/middle/infer/bivariate.rs renamed to src/librustc/infer/bivariate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
use super::combine::{self, CombineFields};
2929
use super::type_variable::{BiTo};
3030

31-
use middle::ty::{self, Ty, TyCtxt};
32-
use middle::ty::TyVar;
33-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
31+
use ty::{self, Ty, TyCtxt};
32+
use ty::TyVar;
33+
use ty::relate::{Relate, RelateResult, TypeRelation};
3434

3535
pub struct Bivariate<'a, 'tcx: 'a> {
3636
fields: CombineFields<'a, 'tcx>

src/librustc/middle/infer/combine.rs renamed to src/librustc/infer/combine.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ use super::{InferCtxt};
4141
use super::{MiscVariable, TypeTrace};
4242
use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
4343

44-
use middle::ty::{IntType, UintType};
45-
use middle::ty::{self, Ty, TyCtxt};
46-
use middle::ty::error::TypeError;
47-
use middle::ty::fold::{TypeFolder, TypeFoldable};
48-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
44+
use ty::{IntType, UintType};
45+
use ty::{self, Ty, TyCtxt};
46+
use ty::error::TypeError;
47+
use ty::fold::{TypeFolder, TypeFoldable};
48+
use ty::relate::{Relate, RelateResult, TypeRelation};
4949

5050
use syntax::ast;
5151
use syntax::codemap::Span;

src/librustc/middle/infer/equate.rs renamed to src/librustc/infer/equate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
1313
use super::{Subtype};
1414
use super::type_variable::{EqTo};
1515

16-
use middle::ty::{self, Ty, TyCtxt};
17-
use middle::ty::TyVar;
18-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
16+
use ty::{self, Ty, TyCtxt};
17+
use ty::TyVar;
18+
use ty::relate::{Relate, RelateResult, TypeRelation};
1919

2020
/// Ensures `a` is made equal to `b`. Returns `a` on success.
2121
pub struct Equate<'a, 'tcx: 'a> {

src/librustc/middle/infer/error_reporting.rs renamed to src/librustc/infer/error_reporting.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ use rustc_front::print::pprust;
8080
use middle::cstore::CrateStore;
8181
use middle::def::Def;
8282
use middle::def_id::DefId;
83-
use middle::infer::{self, TypeOrigin};
83+
use infer::{self, TypeOrigin};
8484
use middle::region;
85-
use middle::subst;
86-
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
87-
use middle::ty::{Region, ReFree};
88-
use middle::ty::error::TypeError;
85+
use ty::subst;
86+
use ty::{self, Ty, TyCtxt, TypeFoldable};
87+
use ty::{Region, ReFree};
88+
use ty::error::TypeError;
8989

9090
use std::cell::{Cell, RefCell};
9191
use std::char::from_u32;

0 commit comments

Comments
 (0)