Skip to content

Commit a643ee8

Browse files
committed
Auto merge of #67953 - cjgillot:split_infer, r=Zoxc
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 #65031
2 parents 5e7af46 + e88500b commit a643ee8

File tree

177 files changed

+8532
-8353
lines changed

Some content is hidden

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

177 files changed

+8532
-8353
lines changed

Cargo.lock

+31-2
Original file line numberDiff line numberDiff line change
@@ -3111,8 +3111,6 @@ dependencies = [
31113111
"bitflags",
31123112
"byteorder",
31133113
"chalk-engine",
3114-
"fmt_macros",
3115-
"graphviz",
31163114
"jobserver",
31173115
"log",
31183116
"measureme",
@@ -3776,6 +3774,28 @@ dependencies = [
37763774
"smallvec 1.0.0",
37773775
]
37783776

3777+
[[package]]
3778+
name = "rustc_infer"
3779+
version = "0.0.0"
3780+
dependencies = [
3781+
"fmt_macros",
3782+
"graphviz",
3783+
"log",
3784+
"rustc",
3785+
"rustc_attr",
3786+
"rustc_data_structures",
3787+
"rustc_error_codes",
3788+
"rustc_errors",
3789+
"rustc_hir",
3790+
"rustc_index",
3791+
"rustc_macros",
3792+
"rustc_session",
3793+
"rustc_span",
3794+
"rustc_target",
3795+
"smallvec 1.0.0",
3796+
"syntax",
3797+
]
3798+
37793799
[[package]]
37803800
name = "rustc_interface"
37813801
version = "0.0.0"
@@ -3796,6 +3816,7 @@ dependencies = [
37963816
"rustc_expand",
37973817
"rustc_hir",
37983818
"rustc_incremental",
3819+
"rustc_infer",
37993820
"rustc_lint",
38003821
"rustc_metadata",
38013822
"rustc_mir",
@@ -3838,6 +3859,7 @@ dependencies = [
38383859
"rustc_feature",
38393860
"rustc_hir",
38403861
"rustc_index",
3862+
"rustc_infer",
38413863
"rustc_session",
38423864
"rustc_span",
38433865
"rustc_target",
@@ -3907,6 +3929,7 @@ dependencies = [
39073929
"rustc_errors",
39083930
"rustc_hir",
39093931
"rustc_index",
3932+
"rustc_infer",
39103933
"rustc_lexer",
39113934
"rustc_macros",
39123935
"rustc_span",
@@ -3929,6 +3952,7 @@ dependencies = [
39293952
"rustc_errors",
39303953
"rustc_hir",
39313954
"rustc_index",
3955+
"rustc_infer",
39323956
"rustc_macros",
39333957
"rustc_session",
39343958
"rustc_span",
@@ -3969,6 +3993,7 @@ dependencies = [
39693993
"rustc_feature",
39703994
"rustc_hir",
39713995
"rustc_index",
3996+
"rustc_infer",
39723997
"rustc_session",
39733998
"rustc_span",
39743999
"rustc_target",
@@ -4019,6 +4044,7 @@ dependencies = [
40194044
"rustc_expand",
40204045
"rustc_feature",
40214046
"rustc_hir",
4047+
"rustc_infer",
40224048
"rustc_metadata",
40234049
"rustc_session",
40244050
"rustc_span",
@@ -4108,6 +4134,7 @@ dependencies = [
41084134
"rustc",
41094135
"rustc_data_structures",
41104136
"rustc_hir",
4137+
"rustc_infer",
41114138
"rustc_macros",
41124139
"rustc_span",
41134140
"rustc_target",
@@ -4123,6 +4150,7 @@ dependencies = [
41234150
"rustc",
41244151
"rustc_data_structures",
41254152
"rustc_hir",
4153+
"rustc_infer",
41264154
"rustc_span",
41274155
"rustc_target",
41284156
]
@@ -4139,6 +4167,7 @@ dependencies = [
41394167
"rustc_errors",
41404168
"rustc_hir",
41414169
"rustc_index",
4170+
"rustc_infer",
41424171
"rustc_span",
41434172
"rustc_target",
41444173
"smallvec 1.0.0",

src/librustc/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ doctest = false
1212
[dependencies]
1313
arena = { path = "../libarena" }
1414
bitflags = "1.2.1"
15-
fmt_macros = { path = "../libfmt_macros" }
16-
graphviz = { path = "../libgraphviz" }
1715
jobserver = "0.1"
1816
scoped-tls = "1.0"
1917
log = { version = "0.4", features = ["release_max_level_info", "std"] }

src/librustc/arena.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ macro_rules! arena_types {
5151
[] dropck_outlives:
5252
rustc::infer::canonical::Canonical<'tcx,
5353
rustc::infer::canonical::QueryResponse<'tcx,
54-
rustc::traits::query::dropck_outlives::DropckOutlivesResult<'tcx>
54+
rustc::traits::query::DropckOutlivesResult<'tcx>
5555
>
5656
>,
5757
[] normalize_projection_ty:
5858
rustc::infer::canonical::Canonical<'tcx,
5959
rustc::infer::canonical::QueryResponse<'tcx,
60-
rustc::traits::query::normalize::NormalizationResult<'tcx>
60+
rustc::traits::query::NormalizationResult<'tcx>
6161
>
6262
>,
6363
[] implied_outlives_bounds:
6464
rustc::infer::canonical::Canonical<'tcx,
6565
rustc::infer::canonical::QueryResponse<'tcx,
66-
Vec<rustc::traits::query::outlives_bounds::OutlivesBound<'tcx>>
66+
Vec<rustc::traits::query::OutlivesBound<'tcx>>
6767
>
6868
>,
6969
[] type_op_subtype:

src/librustc/infer/types/canonical.rs src/librustc/infer/canonical.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//!
2222
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
2323
24-
use crate::infer::region_constraints::MemberConstraint;
24+
use crate::infer::MemberConstraint;
2525
use crate::ty::subst::GenericArg;
2626
use crate::ty::{self, BoundVar, List, Region, TyCtxt};
2727
use rustc_index::vec::IndexVec;

0 commit comments

Comments
 (0)