Skip to content

Commit 4f0dd45

Browse files
committed
Move a lot of rustc_query_system::plumbing to rustc_query_info::plumbing.
We are in the process of eliminating `rustc_query_system`. Chunks of it are unused by `rustc_middle`, and so can be moved into `rustc_query_info`. This commit does some of that. Mostly it's just moving code from one file to another. There are a couple of non-trivial changes. - `QueryState` and `ActiveKeyStatus` must remain in `rustc_query_system` because they are used by `rustc_middle`. But their inherent methods are not used by `rustc_middle`. So these methods are moved and converted to free functions. - The visibility of some things must increase. This includes `DepGraphData` and some of its methods, which are now used in `rustc_query_impl`. This is a bit annoying but seems hard to avoid. What little is left behind in `compiler/rustc_query_system/src/query/plumbing.rs` will be able to moved into `rustc_query_impl` or `rustc_middle` in the future.
1 parent 2017f66 commit 4f0dd45

10 files changed

Lines changed: 758 additions & 760 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,6 +4534,7 @@ version = "0.0.0"
45344534
dependencies = [
45354535
"measureme",
45364536
"rustc_data_structures",
4537+
"rustc_errors",
45374538
"rustc_hashes",
45384539
"rustc_hir",
45394540
"rustc_index",

compiler/rustc_query_impl/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2024"
77
# tidy-alphabetical-start
88
measureme = "12.0.1"
99
rustc_data_structures = { path = "../rustc_data_structures" }
10+
rustc_errors = { path = "../rustc_errors" }
1011
rustc_hashes = { path = "../rustc_hashes" }
1112
rustc_hir = { path = "../rustc_hir" }
1213
rustc_index = { path = "../rustc_index" }

compiler/rustc_query_impl/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
55
#![feature(adt_const_params)]
6+
#![feature(core_intrinsics)]
67
#![feature(min_specialization)]
78
#![feature(rustc_attrs)]
89
// tidy-alphabetical-end
@@ -25,7 +26,7 @@ use rustc_query_system::dep_graph::SerializedDepNodeIndex;
2526
use rustc_query_system::ich::StableHashingContext;
2627
use rustc_query_system::query::{
2728
CycleError, CycleErrorHandling, HashResult, QueryCache, QueryDispatcher, QueryMap, QueryMode,
28-
QueryState, get_query_incr, get_query_non_incr,
29+
QueryState,
2930
};
3031
use rustc_span::{ErrorGuaranteed, Span};
3132

0 commit comments

Comments
 (0)