Skip to content

Commit

Permalink
Auto merge of rust-lang#67953 - cjgillot:split_infer, r=Zoxc
Browse files Browse the repository at this point in the history
Split librustc::{traits,infer} to a separate crate rustc_infer

This is still very much work in progress.
Three functions are between dimensions (at the end of `rustc::traits`), waiting for some dependency breaking scheme.
Please tell me if the approach seems sound, and how you would like to split this PR up.

The formatting is deliberately off, to ease rebasing.

cc rust-lang#65031
  • Loading branch information
bors committed Feb 16, 2020
2 parents 5e7af46 + e88500b commit a643ee8
Show file tree
Hide file tree
Showing 177 changed files with 8,532 additions and 8,353 deletions.
33 changes: 31 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3111,8 +3111,6 @@ dependencies = [
"bitflags",
"byteorder",
"chalk-engine",
"fmt_macros",
"graphviz",
"jobserver",
"log",
"measureme",
Expand Down Expand Up @@ -3776,6 +3774,28 @@ dependencies = [
"smallvec 1.0.0",
]

[[package]]
name = "rustc_infer"
version = "0.0.0"
dependencies = [
"fmt_macros",
"graphviz",
"log",
"rustc",
"rustc_attr",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
"rustc_macros",
"rustc_session",
"rustc_span",
"rustc_target",
"smallvec 1.0.0",
"syntax",
]

[[package]]
name = "rustc_interface"
version = "0.0.0"
Expand All @@ -3796,6 +3816,7 @@ dependencies = [
"rustc_expand",
"rustc_hir",
"rustc_incremental",
"rustc_infer",
"rustc_lint",
"rustc_metadata",
"rustc_mir",
Expand Down Expand Up @@ -3838,6 +3859,7 @@ dependencies = [
"rustc_feature",
"rustc_hir",
"rustc_index",
"rustc_infer",
"rustc_session",
"rustc_span",
"rustc_target",
Expand Down Expand Up @@ -3907,6 +3929,7 @@ dependencies = [
"rustc_errors",
"rustc_hir",
"rustc_index",
"rustc_infer",
"rustc_lexer",
"rustc_macros",
"rustc_span",
Expand All @@ -3929,6 +3952,7 @@ dependencies = [
"rustc_errors",
"rustc_hir",
"rustc_index",
"rustc_infer",
"rustc_macros",
"rustc_session",
"rustc_span",
Expand Down Expand Up @@ -3969,6 +3993,7 @@ dependencies = [
"rustc_feature",
"rustc_hir",
"rustc_index",
"rustc_infer",
"rustc_session",
"rustc_span",
"rustc_target",
Expand Down Expand Up @@ -4019,6 +4044,7 @@ dependencies = [
"rustc_expand",
"rustc_feature",
"rustc_hir",
"rustc_infer",
"rustc_metadata",
"rustc_session",
"rustc_span",
Expand Down Expand Up @@ -4108,6 +4134,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_hir",
"rustc_infer",
"rustc_macros",
"rustc_span",
"rustc_target",
Expand All @@ -4123,6 +4150,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_hir",
"rustc_infer",
"rustc_span",
"rustc_target",
]
Expand All @@ -4139,6 +4167,7 @@ dependencies = [
"rustc_errors",
"rustc_hir",
"rustc_index",
"rustc_infer",
"rustc_span",
"rustc_target",
"smallvec 1.0.0",
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ doctest = false
[dependencies]
arena = { path = "../libarena" }
bitflags = "1.2.1"
fmt_macros = { path = "../libfmt_macros" }
graphviz = { path = "../libgraphviz" }
jobserver = "0.1"
scoped-tls = "1.0"
log = { version = "0.4", features = ["release_max_level_info", "std"] }
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ macro_rules! arena_types {
[] dropck_outlives:
rustc::infer::canonical::Canonical<'tcx,
rustc::infer::canonical::QueryResponse<'tcx,
rustc::traits::query::dropck_outlives::DropckOutlivesResult<'tcx>
rustc::traits::query::DropckOutlivesResult<'tcx>
>
>,
[] normalize_projection_ty:
rustc::infer::canonical::Canonical<'tcx,
rustc::infer::canonical::QueryResponse<'tcx,
rustc::traits::query::normalize::NormalizationResult<'tcx>
rustc::traits::query::NormalizationResult<'tcx>
>
>,
[] implied_outlives_bounds:
rustc::infer::canonical::Canonical<'tcx,
rustc::infer::canonical::QueryResponse<'tcx,
Vec<rustc::traits::query::outlives_bounds::OutlivesBound<'tcx>>
Vec<rustc::traits::query::OutlivesBound<'tcx>>
>
>,
[] type_op_subtype:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//!
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html

use crate::infer::region_constraints::MemberConstraint;
use crate::infer::MemberConstraint;
use crate::ty::subst::GenericArg;
use crate::ty::{self, BoundVar, List, Region, TyCtxt};
use rustc_index::vec::IndexVec;
Expand Down
Loading

0 comments on commit a643ee8

Please sign in to comment.