Skip to content

Commit 9906bae

Browse files
committed
Move rustc_query_system::query::dep_graph to rustc_middle.
Most of the files within the `dep_graph` module can be moved wholesale into `rustc_middle`. But two of them (`mod.rs` and `dep_node.rs`) have the same name as existing files in `rustc_middle`, so for those I just copied the contents into the existing files. The commit also moves `QueryContext` and `incremental_verify_ich*` because they are tightly intertwined with the dep graph code. And a couple of error structs moved as well.
1 parent d96bebe commit 9906bae

31 files changed

Lines changed: 663 additions & 699 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4093,7 +4093,6 @@ dependencies = [
40934093
"rustc_passes",
40944094
"rustc_privacy",
40954095
"rustc_query_impl",
4096-
"rustc_query_system",
40974096
"rustc_resolve",
40984097
"rustc_session",
40994098
"rustc_span",
@@ -4519,13 +4518,11 @@ dependencies = [
45194518
"rustc_errors",
45204519
"rustc_feature",
45214520
"rustc_hir",
4522-
"rustc_index",
45234521
"rustc_macros",
45244522
"rustc_serialize",
45254523
"rustc_session",
45264524
"rustc_span",
45274525
"smallvec",
4528-
"tracing",
45294526
]
45304527

45314528
[[package]]

compiler/rustc_interface/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ rustc_parse = { path = "../rustc_parse" }
3535
rustc_passes = { path = "../rustc_passes" }
3636
rustc_privacy = { path = "../rustc_privacy" }
3737
rustc_query_impl = { path = "../rustc_query_impl" }
38-
rustc_query_system = { path = "../rustc_query_system" }
3938
rustc_resolve = { path = "../rustc_resolve" }
4039
rustc_session = { path = "../rustc_session" }
4140
rustc_span = { path = "../rustc_span" }

compiler/rustc_interface/src/callbacks.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
use std::fmt;
1313

1414
use rustc_errors::{DiagInner, TRACK_DIAGNOSTIC};
15-
use rustc_middle::dep_graph::{DepNodeExt, TaskDepsRef};
15+
use rustc_middle::dep_graph::dep_node::default_dep_kind_debug;
16+
use rustc_middle::dep_graph::{DepContext, DepKind, DepNode, DepNodeExt, TaskDepsRef};
1617
use rustc_middle::ty::tls;
1718
use rustc_query_impl::QueryCtxt;
18-
use rustc_query_system::dep_graph::dep_node::default_dep_kind_debug;
19-
use rustc_query_system::dep_graph::{DepContext, DepKind, DepNode};
2019

2120
fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
2221
tls::with_context_opt(|icx| {
@@ -107,9 +106,9 @@ pub fn dep_node_debug(node: DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fm
107106
pub fn setup_callbacks() {
108107
rustc_span::SPAN_TRACK.swap(&(track_span_parent as fn(_)));
109108
rustc_hir::def_id::DEF_ID_DEBUG.swap(&(def_id_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
110-
rustc_query_system::dep_graph::dep_node::DEP_KIND_DEBUG
109+
rustc_middle::dep_graph::dep_node::DEP_KIND_DEBUG
111110
.swap(&(dep_kind_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
112-
rustc_query_system::dep_graph::dep_node::DEP_NODE_DEBUG
111+
rustc_middle::dep_graph::dep_node::DEP_NODE_DEBUG
113112
.swap(&(dep_node_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
114113
TRACK_DIAGNOSTIC.swap(&(track_diagnostic as _));
115114
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)